Re: [AD] abort on exit in X port |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Peter Wang wrote:
I've been meaning to bring this up but kept forgetting. Is anyone
else getting SIGABRTs when Allegro programs exit, in the X port? It
doesn't always happen, but it's not uncommon either.
Ok, this is solved. The attached patch was applied to trunk and
branch. Thanks to Chris for his help in #allegro.
Peter
Index: src/x/xsystem.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/x/xsystem.c,v
retrieving revision 1.26
diff -u -r1.26 xsystem.c
--- src/x/xsystem.c 26 Nov 2002 13:46:05 -0000 1.26
+++ src/x/xsystem.c 13 Aug 2004 11:45:59 -0000
@@ -222,6 +222,12 @@
*/
static void _xwin_sysdrv_exit(void)
{
+ /* This stops the X event handler running in the background, which
+ * seems a nice thing to do before closing the connection to the X
+ * display... (remove this and you get SIGABRTs during XCloseDisplay).
+ */
+ _unix_bg_man->unregister_func(_xwin_bg_handler);
+
_xwin_close_display();
_unix_bg_man->exit();