diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-12-03 14:04:03 +0000 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-12-03 14:04:03 +0000 |
commit | d5c32667ad11ff38dc46be527266297b38a341d1 (patch) | |
tree | b3ce68f179d97e6e25e5c8e7ace845c4a561322b /libc/signal/sigpause.c | |
parent | 329ef3196b396a70eecd5a4789845d368b488ab7 (diff) | |
download | uClibc-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.c | 12 |
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 |