diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-03-09 20:31:06 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-03-09 20:31:06 -0500 |
commit | 500c969f059dc1b12dc3809d270cb169abbd57d3 (patch) | |
tree | 451ff6c500acea4d15c1e908bb8515016b09f405 /src/thread | |
parent | 3f5420bcda134de80ed6b0f0da1d7d23f147a4cc (diff) | |
download | musl-500c969f059dc1b12dc3809d270cb169abbd57d3.tar.gz musl-500c969f059dc1b12dc3809d270cb169abbd57d3.tar.xz musl-500c969f059dc1b12dc3809d270cb169abbd57d3.zip |
fix error handling for pthread_sigmask
it must return errno, not -1, and should reject invalud values for how.
Diffstat (limited to 'src/thread')
-rw-r--r-- | src/thread/pthread_sigmask.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/thread/pthread_sigmask.c b/src/thread/pthread_sigmask.c new file mode 100644 index 00000000..6cc21d22 --- /dev/null +++ b/src/thread/pthread_sigmask.c @@ -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; +} |