]> git.pond.sub.org Git - empserver/commitdiff
_exit() fails to terminate all threads on at least some versions of
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 20 Jun 2006 18:36:20 +0000 (18:36 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 20 Jun 2006 18:36:20 +0000 (18:36 +0000)
LinuxThreads, use exit() where possible:
(shutdwn): No longer a signal handler, can safely call exit().
(main, loc_NTInit): No obvious reason for not using exit().

src/server/main.c

index 66e383f8d08d06f8e02982e5166c0013028d46f5..7f703c477da9386cca6e508a31c5fa93ff316247 100644 (file)
@@ -257,7 +257,7 @@ main(int argc, char **argv)
     if (daemonize) {
        if (disassoc() < 0) {
            logerror("Can't become daemon (%s)", strerror(errno));
-           _exit(1);
+           exit(1);
        }
     }
 #endif /* !_WIN32 */
@@ -406,7 +406,7 @@ shutdwn(int sig)
     if (daemonize)
         stop_service();
 #endif
-    _exit(0);
+    exit(0);
 }
 
 #if defined(_WIN32)
@@ -421,7 +421,7 @@ loc_NTInit(void)
     rc = WSAStartup(wVersionRequested, &wsaData);
     if (rc != 0) {
        logerror("WSAStartup failed.  %d", rc);
-       _exit(1);
+       exit(1);
     }
 }