call[fs]cgi: Call killcuraddr explicitly instead of as an exit handler.
[ashd.git] / src / callfcgi.c
index 2b3717e..1abe7d3 100644 (file)
@@ -758,7 +758,6 @@ static void sigign(int sig)
 static void sigexit(int sig)
 {
     shutdown(0, SHUT_RDWR);
-    exit(0);
 }
 
 static void usage(FILE *out)
@@ -802,7 +801,7 @@ int main(int argc, char **argv)
     signal(SIGINT, sigexit);
     signal(SIGTERM, sigexit);
     mustart(listenloop, 0);
-    atexit(killcuraddr);
     ioloop();
+    killcuraddr();
     return(0);
 }