From 500c969f059dc1b12dc3809d270cb169abbd57d3 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 9 Mar 2011 20:31:06 -0500 Subject: fix error handling for pthread_sigmask it must return errno, not -1, and should reject invalud values for how. --- src/thread/pthread_sigmask.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/thread/pthread_sigmask.c (limited to 'src/thread') 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 +#include +#include + +int pthread_sigmask(int how, const sigset_t *set, sigset_t *old) +{ + int ret = sigprocmask(how, set, old); + if (ret) return errno; + return 0; +} -- cgit 1.4.1