summaryrefslogtreecommitdiffstats
path: root/libc/signal/sigpause.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-12-03 14:04:03 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-12-03 14:04:03 +0000
commitd5c32667ad11ff38dc46be527266297b38a341d1 (patch)
treeb3ce68f179d97e6e25e5c8e7ace845c4a561322b /libc/signal/sigpause.c
parent329ef3196b396a70eecd5a4789845d368b488ab7 (diff)
downloaduClibc-alpine-d5c32667ad11ff38dc46be527266297b38a341d1.tar.bz2
uClibc-alpine-d5c32667ad11ff38dc46be527266297b38a341d1.tar.xz
Synch with trunk @ 24242
Step 18: some more synch: hidden_proto, size reduction and signal handling changes.
Diffstat (limited to 'libc/signal/sigpause.c')
-rw-r--r--libc/signal/sigpause.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libc/signal/sigpause.c b/libc/signal/sigpause.c
index 8cf28ac6e..3275b7ab4 100644
--- a/libc/signal/sigpause.c
+++ b/libc/signal/sigpause.c
@@ -40,16 +40,16 @@ int __sigpause (int sig_or_mask, int is_sig)
{
sigset_t set;
- if (is_sig != 0)
+ if (is_sig)
{
/* The modern X/Open implementation is requested. */
- if (sigprocmask (0, NULL, &set) < 0
- /* Yes, we call `sigdelset' and not `__sigdelset'. */
- || sigdelset (&set, sig_or_mask) < 0)
+ sigprocmask (SIG_BLOCK, NULL, &set);
+ /* Bound-check sig_or_mask, remove it from the set. */
+ if (sigdelset (&set, sig_or_mask) < 0)
return -1;
}
- else if (sigset_set_old_mask (&set, sig_or_mask) < 0)
- return -1;
+ else
+ sigset_set_old_mask (&set, sig_or_mask);
/* Note the sigpause() is a cancellation point. But since we call
sigsuspend() which itself is a cancellation point we do not have