GNOME Bugzilla – Bug 90345
Evil atexit
Last modified: 2006-07-10 13:51:35 UTC
gnome-client.c does an atexit of master_client_clean_up Which, via master_client_disconnect() does some useless X calls that cause problems if exit() occurred in response to an X error or X IO error. I'm not sure if the atexit can be removed entirely ... if gnome-session is non-buggy it can (or gnome-session could crash on app crashes, which I haven't seen in a long, long time.) The minimal fix would be to disconnect the signal connection to master_client_disconnect() before calling gnome_client_disconnect(). This is an absolutely safe fix. The more radical thing would be to remove the atexit altogether; I think we should do that for gnome-2.2. If gsm can't handle abnoraml app termination, we need to know about it, and fix it.
Upping pri on this.
Attaching a patch. Owen, is this what you meant?
Created attachment 21946 [details] [review] patch
Anyone looked at this the last couple of years? :-)
Given that we've been doing this for years, with no apparent user-visible side-effects, I'm marking this down from high. Owen, if you disagree, speak up :)
Yes, that's basically what I meant for "remove the atexit entirely" If you do that, you should do some tests of 'kill <app_pid>' and make sure that it gets cleaned up properly in the session.
Going to give this a whirl for 2.15.x
Didn't find any problems from my testing so I'm commiting this.