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