Fix pthread_sigmask() usage to block all signals.

This commit is contained in:
Qi Wang 2017-06-26 11:17:45 -07:00 committed by Qi Wang
parent 57beeb2fcb
commit aa363f9388

View File

@ -355,7 +355,7 @@ background_thread_create_signals_masked(pthread_t *thread,
* an empty signal set. * an empty signal set.
*/ */
sigset_t set; sigset_t set;
sigemptyset(&set); sigfillset(&set);
sigset_t oldset; sigset_t oldset;
int mask_err = pthread_sigmask(SIG_SETMASK, &set, &oldset); int mask_err = pthread_sigmask(SIG_SETMASK, &set, &oldset);
if (mask_err != 0) { if (mask_err != 0) {