]> git.pond.sub.org Git - empserver/commitdiff
(shutdwn): No longer a signal handler, no need to avoid sleeping.
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 7 Jun 2006 21:45:46 +0000 (21:45 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 7 Jun 2006 21:45:46 +0000 (21:45 +0000)
This lets player threads send C_EXIT properly even when the server
shuts down on a signal.

src/server/main.c

index 1b5713416b19541ab69573d51d766bba9092d7cc..56bd3517e8ef1bb38d6ccf0535aa9cf07c213acb 100644 (file)
@@ -374,14 +374,8 @@ shutdwn(int sig)
        empth_wakeup(p->proc);
     }
 
-    if (!sig) {
-       /* Sleep and let some cleanup happen - note this doesn't work
-          when called from a signal handler, since we may or may not
-          be in the right thread.  So we just pass by and kill 'em
-          all. */
-       time(&now);
-       empth_sleep(now + 1);
-    }
+    time(&now);
+    empth_sleep(now + 1);
 
     for (p = player_next(0); p != 0; p = player_next(p)) {
        p->state = PS_KILL;