After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 90345 - Evil atexit
Evil atexit
Status: RESOLVED FIXED
Product: libgnomeui
Classification: Deprecated
Component: general
2.2.x
Other Linux
: Normal normal
: future
Assigned To: libgnomeui maintainers
libgnomeui maintainers
Depends on:
Blocks:
 
 
Reported: 2002-08-09 19:19 UTC by Owen Taylor
Modified: 2006-07-10 13:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
patch (479 bytes, patch)
2003-11-30 20:04 UTC, Kjartan Maraas
none Details | Review

Description Owen Taylor 2002-08-09 19:19:22 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.
Comment 1 Kjartan Maraas 2003-05-12 22:06:49 UTC
Upping pri on this.
Comment 2 Kjartan Maraas 2003-11-30 20:03:46 UTC
Attaching a patch. Owen, is this what you meant?
Comment 3 Kjartan Maraas 2003-11-30 20:04:20 UTC
Created attachment 21946 [details] [review]
patch
Comment 4 Kjartan Maraas 2005-01-04 23:25:30 UTC
Anyone looked at this the last couple of years? :-)
Comment 5 Luis Villa 2005-01-23 20:35:11 UTC
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 :)
Comment 6 Owen Taylor 2005-07-01 16:48:46 UTC
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.
Comment 7 Kjartan Maraas 2006-04-07 07:09:39 UTC
Going to give this a whirl for 2.15.x
Comment 8 Kjartan Maraas 2006-07-10 13:51:35 UTC
Didn't find any problems from my testing so I'm commiting this.