More loitering process curiosities

W. Michael Petullo mike at flyn.org
Tue Feb 17 18:24:41 UTC 2004


>>>> We've made some progress getting gconfd-2 to exit when a user logs out
>>>> (see "gconfd-2 does not exit when a user log out, breaks unmounting
>>>> home" thread).  Now I am interested in turning my attention to some
>>>> other processes that seem to loiter around after one logs out of a GNOME
>>>> 2.4.0 session.

>>>> Pam_mount performs an lsof that claims the processes are still running
>>>> when pam_close_session is called, but the processes are gone after the
>>>> user is completely logged out (Unlike gconfd-2, which stayed running
>>>> for two minutes).

>>>> The following processes hang around (with $HOME as their CWD):

>>>> bonobo-activation-server
>>>> gnome-settings-daemon
>>>> xscreensaver
>>>> mapping-daemon
 
>>> But I'm still curious about this process hierarchy.  Why do processes
>>> like bonobo-activation-server and gnome-panel seem to execute with init
>>> as their parent?
 
>> When doing a fork/exec, GLib programs usually use the g_spawn_ family of
>> functions; these fork twice, creating an intermediate child process that
>> immediately exits and is reaped by the parent. The purpose is to avoid
>> zombies, as usually in a GUI context parent/child doesn't mean much. 
>> (e.g. say Evolution launches your web browser there's no point really
>> having the browser be a child of evolution)
 
> Thanks to all who explained.  There is also a mail thread from 2000 on
> gnome-devel-list titled "Process Tree."
 
> I updated the gconfd-2-killing gnome-session patch I have submitted to
> GNOME's bugzilla to use execvp/waitpid instead of gnome_execute_async.
> Is there a more GNOME/glib-happy way to wait for a forked process?
 
> I also send the following very simple patch to the gdm folks.  It fixes my
> problem with X programs hanging around when pam_close_session is called,
> but I'm not sure if it would break anything else.  Here it is:

[...]

These problems still exist in Fedora Core 2 Test 1.

Though gconfd-2 seems to have been resolved, the following processes
still have problems quiting when a user logs out:

bonobo-activation-server keeps $HOME open as its CWD (libbonobo-2.5.3-1)
gnome-vfs-daemon keeps $HOME open as its CWD (gnome-vfs2-2.5.7-1)
mapping-daemon keeps $HOME open as its CWD (nautilus-cd-burner-0.6.5-1)
gnome-settings-daemon?

All of these processes make unmounting $HOME on logout difficult.

See also:

http://bugzilla.gnome.org/show_bug.cgi?id=97361
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=67605

-- 
Mike

:wq





More information about the devel mailing list