sigwait() forgets to check if a pending signal is also one of the
signals the caller wants.

2001-12-26  Jeroen Dekkers  <[EMAIL PROTECTED]>

        * 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: [EMAIL PROTECTED]
Debian GNU supporter - http://www.debian.org http://www.gnu.org
IRC: [EMAIL PROTECTED]

Attachment: msg02484/pgp00000.pgp
Description: PGP signature

Reply via email to