[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Bug in sigwait()
From: |
Jeroen Dekkers |
Subject: |
[PATCH] Bug in sigwait() |
Date: |
Wed, 26 Dec 2001 17:23:40 +0100 |
User-agent: |
Mutt/1.3.24i |
sigwait() forgets to check if a pending signal is also one of the
signals the caller wants.
2001-12-26 Jeroen Dekkers <jeroen@dekkers.cx>
* sysdeps/mach/hurd/sigwait.c (__sigwait): Check if the
pending signal is also in MASK before returning.
Index: sysdeps/mach/hurd/sigwait.c
===================================================================
RCS file: /cvs/glibc/sysdeps/mach/hurd/sigwait.c,v
retrieving revision 1.4
diff -u -p -r1.4 sigwait.c
--- sysdeps/mach/hurd/sigwait.c 6 Jul 2001 04:55:57 -0000 1.4
+++ sysdeps/mach/hurd/sigwait.c 26 Dec 2001 15:44:28 -0000
@@ -76,7 +76,8 @@ __sigwait (const sigset_t *set, int *sig
if (ss->pending & mask)
{
for (signo = 1; signo < NSIG; signo++)
- if (__sigismember (&ss->pending, signo))
+ if (__sigismember (&ss->pending, signo)
+ && __sigismember (&mask, signo))
{
__sigdelset (&ss->pending, signo);
goto all_done;
--
Jabber supporter - http://www.jabber.org Jabber ID: jdekkers@jabber.org
Debian GNU supporter - http://www.debian.org http://www.gnu.org
IRC: jeroen@openprojects.net
pgp5pKou_Pmxo.pgp
Description: PGP signature
- [PATCH] Bug in sigwait(),
Jeroen Dekkers <=