mirror of
https://github.com/fluencelabs/musl
synced 2025-06-30 07:02:41 +00:00
fix error handling for pthread_sigmask
it must return errno, not -1, and should reject invalud values for how.
This commit is contained in:
10
src/thread/pthread_sigmask.c
Normal file
10
src/thread/pthread_sigmask.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
||||
int pthread_sigmask(int how, const sigset_t *set, sigset_t *old)
|
||||
{
|
||||
int ret = sigprocmask(how, set, old);
|
||||
if (ret) return errno;
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user