X-Git-Url: http://git.pond.sub.org/?p=empserver;a=blobdiff_plain;f=src%2Fserver%2Fmain.c;h=336eb6a65d1e4c408b910b9271f4481bbdce08f8;hp=44a4f9a49e2042f3437354b0ab908f58a37667b7;hb=0a4d77e9;hpb=bd6d9d53a05159754cbbc15ad29688cee8cb25fa diff --git a/src/server/main.c b/src/server/main.c index 44a4f9a49..336eb6a65 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -86,13 +86,6 @@ static void loc_NTTerm(void); */ empth_rwlock_t *play_lock; -/* - * Is a thread attempting to take an exclusive play_lock? - * Threads holding a shared play_lock must not sleep while this is - * true. - */ -int play_wrlock_wanted; - static char pidfname[] = "server.pid"; /* Run as daemon? If yes, detach from controlling terminal etc. */ @@ -421,12 +414,12 @@ shutdwn(int sig) logerror("Shutdown commencing (cleaning up threads.)"); - play_wrlock_wanted = 1; for (p = player_next(NULL); p; p = player_next(p)) { if (p->state != PS_PLAYING) continue; pr_flash(p, "Server shutting down...\n"); p->state = PS_SHUTDOWN; + p->may_sleep = PLAYER_SLEEP_NEVER; p->aborted++; if (p->command) { pr_flash(p, "Shutdown aborting command\n");