Re: GChildWatch source -- take two
- From: Joshua N Pritikin <vishnu pobox com>
- To: Jonathan Blandford <jrb redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GChildWatch source -- take two
- Date: Fri, 25 Jul 2003 06:48:54 +0530
On Thu, Jul 24, 2003 at 03:44:02PM -0400, Jonathan Blandford wrote:
> "Alexis S. L. Carvalho" <alexis cecm usp br> writes:
> > Thus spake Jonathan Blandford:
> > > No, I meant to have g_child_watch_add(-1) have the same effect as
> > > calling waitpid(-1). That is to say, it'll give notice of every child
> > > process that exits. g_child_watch_add(0) will give notice of children
> > > in the process group, just as waitpid(0) does. With this behavior, it
> > > makes more sense to check the return value of the call.
> >
> > This feature might be useful, but there are some points that would be
> > difficult to implement (or would require quite a few modifications in
> > the patch):
>
> > I'd say to leave this out for now and see if somebody complains - you
> > may have to check that pid > 0 in g_child_watch_source_new, to guarantee
> > that nobody tries to use this behind GLib.
>
> I was thinking that you can call watch_add(-1), watch_add(0), or
> multiple calls watch_add(>0). That defeats the purpose of this call,
> though. It's intended to let different libraries that may not know
> about each other watch for child-processes exiting. You might be right
> -- calling waitpid(-1) every time could solve some of these problems..
> I'm not sure if I have time and energy right now to refactor the code to
> do this.
I haven't been following this discussion very closely, but I am
surprise that you are considering allowing waitpid(-1) or waitpid(0).
I expect GChildWatch to interoperate with other child monitoring
schemes. The only way this can happens is if it ignores children
that it doesn't know about.
--
Victory to the Divine Mother!! after all,
http://sahajayoga.org http://why-compete.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]