Comment 92 for bug 282939

Revision history for this message
Aisano (info-ais-sanmarino) wrote : Re: gnusound crashes X session immediately on launch (Affects Intrepid, Jaunty, Karmic)

It is somewhat discomforting that an error in gnusound terminates the Gnome session. I looked into this and found that gnusound defines an elaborate signal handler, probably with the intention to save as much of the user's ongoing work as possible. The code is contained in the "emergency.c" module.

Now the last statement in the "emergency_sighandler" function is a "kill(0, original_signo)". This propagates the caught signal to all processes in the same process group. A "ps -ej" command shows that all processes started through a Gnome menu or a Gnome launcher share the same process group, whose number is the process id of the "gnome-session" process. So when gnusound crashes from a SIGABRT (as in the present case) this signal is propagated to the Gnome session, which accordingly terminates.

Presently I neither understand why all processes launched by Gnome share a process group nor why gnusound propagates signals to the whole process group. The combination of these two facts is certainly fatal and undesirable. Somebody who understands this better than I presently do might make a separate bug out of this.