GNOME Bugzilla – Bug 559168
Make parent wait for initialization in children to finish before returning
Last modified: 2010-03-24 18:19:29 UTC
Such that we set all the settings before other applications are started.
Created attachment 121901 [details] [review] the patch
+ (void) chdir ("/"); The (void) should go if it doesn't work anyway. Indentation again, and maybe also add a comment why you don't simply daemonize before gtk_main.
Added comments and committed. 2008-11-03 Behdad Esfahbod <behdad@gnome.org> * gnome-settings-daemon/main.c (daemonize), (main): Make parent wait for initialization in children to finish before returning. This makes gnome-session to wait for initialization to be done before spawning other processes. This way, apps start up with the right xsettings and other settings, and don't have to handle change signals right after starting up. (bug #559168)
Ok, after some testing, I figured the kill+wait scheme doesn't work. Fixed using a pipe. 2008-11-04 Behdad Esfahbod <behdad@gnome.org> * gnome-settings-daemon/main.c (daemonize), (main): Use a pipe to communicate between child and parent process instead of a signal. Signals are not queued, so if the child tried to signal the parent before the parent got a chance to wait for it, the signal would be lost and parent wait indefinitely for a signal that would never arrive.
Created attachment 129129 [details] [review] change to use signal to terminate parent process waitpid can not return when receiving the signal of SIGCHLD. Change to use signal to terminate parent process.
Can you please elaborate what problem you are seeing that you are trying to fix? And please provide patches against trunk. 2.24.x is in maintainance mode.
And please file new bugs instead of raising long-dead ones in the future. Thanks.
Closing as FIXED since patches have been written and committed. Feel free to revert.