Re: Process Tree



>>>>> "Loris" == Loris Santamaria <loris cantv net> writes:

Loris> I never understood why all processed spawned by gnome-session
Loris> have PPID=1, thus being shown as children of init, instead of
Loris> showing as child processes of gnome-session as they should be
Loris> (IMO). It doesn't happen in bash, nor in kde nor in xsm (the X
Loris> Session Manager), so it seems to me against common UNIX
Loris> practice.... I think that processed spawned by gnome-session
Loris> should have as PPID the PID of gnome-session, and processed
Loris> launched from the panel should be child processes of the panel
Loris> (or gmc?).

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.

Tom




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