--- src/XF86DGA.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) Index: libxxf86dga-1.0.1/src/XF86DGA.c =================================================================== --- libxxf86dga-1.0.1.orig/src/XF86DGA.c 2007-01-30 23:02:04.000000000 +0100 +++ libxxf86dga-1.0.1/src/XF86DGA.c 2007-01-30 23:16:52.000000000 +0100 @@ -649,16 +649,21 @@ return 1; } +static void +XF86cleanup_wrapper(int sig) +{ + exit(3); +} static void -XF86cleanup(int sig) +XF86cleanup() { ScrPtr sp; int i; static char beenhere = 0; if (beenhere) - _exit(3); + return; beenhere = 1; for (i = 0; i < numScrs; i++) { @@ -666,7 +671,7 @@ XF86DGADirectVideo(sp->display, sp->screen, 0); XSync(sp->display, False); } - _exit(3); + return; } Bool @@ -709,12 +714,12 @@ beenHere = 1; atexit((void(*)(void))XF86cleanup); /* one shot XF86cleanup attempts */ - signal(SIGSEGV, XF86cleanup); + signal(SIGSEGV, XF86cleanup_wrapper); #ifdef SIGBUS - signal(SIGBUS, XF86cleanup); + signal(SIGBUS, XF86cleanup_wrapper); #endif - signal(SIGHUP, XF86cleanup); - signal(SIGFPE, XF86cleanup); + signal(SIGHUP, XF86cleanup_wrapper); + signal(SIGFPE, XF86cleanup_wrapper); } return 1;