(shutdwn): No longer a signal handler, no need to avoid sleeping.
This lets player threads send C_EXIT properly even when the server shuts down on a signal.
This commit is contained in:
parent
8562a40136
commit
5c7e97c522
1 changed files with 2 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue