diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-01-28 09:08:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-01-28 09:08:07 +0000 |
commit | 772e3426a7b6f5200cb1029d41308b8b666cdbab (patch) | |
tree | 7f881f4054beae5b9352ad9771e37ce31dee8b8d /sysdeps/posix | |
parent | 0566b130fbb77c2673d0459b4d9ff825fc68b094 (diff) | |
download | glibc-772e3426a7b6f5200cb1029d41308b8b666cdbab.tar.gz glibc-772e3426a7b6f5200cb1029d41308b8b666cdbab.tar.xz glibc-772e3426a7b6f5200cb1029d41308b8b666cdbab.zip |
Update.
2003-01-28 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/common/pause.c (do_pause): New function. Split from __libc_pause. Implement using sigsuspend. (__libc_pause): Call do_pause to do the real work. * sysdeps/posix/sigpause.c (do_sigpause): Check range of sig_or_mask parameter is is_sig != 0.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r-- | sysdeps/posix/sigpause.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/posix/sigpause.c b/sysdeps/posix/sigpause.c index e85a813ab0..bf2ca6588d 100644 --- a/sysdeps/posix/sigpause.c +++ b/sysdeps/posix/sigpause.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94-98,2000,02 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94-98,2000,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,7 +34,8 @@ do_sigpause (int sig_or_mask, int is_sig) { /* The modern X/Open implementation is requested. */ if (__sigprocmask (0, NULL, &set) < 0 - /* Yes, we call `sigdelset' and not `__sigdelset'. */ + /* Perform the tests from sigdelset ourselves. */ + || sig_or_mask <= 0 || sig_or_mask >= NSIG || __sigdelset (&set, sig_or_mask) < 0) return -1; } |