Fix the previous revision.
This commit is contained in:
parent
7183516d91
commit
8562a40136
1 changed files with 3 additions and 1 deletions
|
@ -342,7 +342,6 @@ empth_select(int fd, int flags)
|
|||
done:
|
||||
pthread_mutex_lock(&mtx_ctxsw);
|
||||
empth_restorectx();
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -388,6 +387,7 @@ empth_wait_for_shutdown(void)
|
|||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGINT);
|
||||
sigaddset(&set, SIGTERM);
|
||||
pthread_mutex_unlock(&mtx_ctxsw);
|
||||
for (;;) {
|
||||
empth_status("waiting for signals");
|
||||
err = sigwait(&set, &sig);
|
||||
|
@ -396,6 +396,8 @@ empth_wait_for_shutdown(void)
|
|||
continue;
|
||||
}
|
||||
empth_status("got awaited signal %d", sig);
|
||||
pthread_mutex_lock(&mtx_ctxsw);
|
||||
empth_restorectx();
|
||||
return sig;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue