Use pthread_sigmask instead of sigprocmask
This commit is contained in:
ridiculousfish
2012-07-09 14:15:55 -07:00
parent cd3ed71137
commit 36a91fc6ff
3 changed files with 17 additions and 12 deletions

View File

@@ -623,9 +623,9 @@ int read_blocked(int fd, void *buf, size_t count)
sigemptyset( &chldset );
sigaddset( &chldset, SIGCHLD );
sigprocmask(SIG_BLOCK, &chldset, &oldset);
VOMIT_ON_FAILURE(pthread_sigmask(SIG_BLOCK, &chldset, &oldset));
res = read( fd, buf, count );
sigprocmask( SIG_SETMASK, &oldset, 0 );
VOMIT_ON_FAILURE(pthread_sigmask(SIG_SETMASK, &oldset, NULL));
return res;
}