summaryrefslogtreecommitdiff
path: root/lib/pthread_sigmask.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-07-09 01:01:36 +0200
committerBruno Haible <bruno@clisp.org>2011-07-09 01:01:36 +0200
commit43243b5fdcf1e0c0e016cabe190f1ab29b984871 (patch)
tree5154cb39e3b26fbfb434f8033d30b4fd9a2e59d0 /lib/pthread_sigmask.c
parent2616a6587c4240184112fdd18d164227824a32f0 (diff)
downloadgnulib-43243b5fdcf1e0c0e016cabe190f1ab29b984871.tar.gz
pthread_sigmask: Work around Cygwin bug.
* m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the Cygwin bug. * lib/pthread_sigmask.c (pthread_sigmask): Fix the return value from the system's pthread_sigmask function. * doc/posix-functions/pthread_sigmask.texi: Mention the Cygwin bug.
Diffstat (limited to 'lib/pthread_sigmask.c')
-rw-r--r--lib/pthread_sigmask.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pthread_sigmask.c b/lib/pthread_sigmask.c
index b53b15dd71..06ee7fc420 100644
--- a/lib/pthread_sigmask.c
+++ b/lib/pthread_sigmask.c
@@ -43,6 +43,10 @@ pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
}
}
# endif
+# if PTHREAD_SIGMASK_FAILS_WITH_ERRNO
+ if (ret == -1)
+ return errno;
+# endif
return ret;
#else
int ret = sigprocmask (how, new_mask, old_mask);