Re: Process Tree



On 25 Oct 2000, Tom Tromey wrote:
: 
: For local restarts gnome-session uses gnome_execute_async_with_env.
: This function launches the new executable as a grandchild (not child)
: of the current process.   I wrote gnome_execute_async_with_env this
: way because it let us avoid dealing with SIGCHLD / zombie issues in
: the Gnome libraries.
: 
: That was a kind of lazy decision on my part.  SIGCHLD handling could
: be moved into glib, I guess.  That would be a "fix" in a way.  It's an
: ugly situation because this handling is global to the process, but
: different modules in the process might have different desires and
: expectations.  I consider it one of the warts on Unix.

I ran into the grandchild issue when I wanted to launch a subprocess with
gnome_execute_async_with_env() and then waitpid() on it. I didn't know
(until I tried) that you can't wait on a grandchild. I managed to work
around it but it seems to break the Principle of Least Surprise. Like you
say, it's just ugly.


-- 
http://web.systhug.com/
If you strike me down, I shall become more powerful than you can possibly
imagine.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]