The following patch fixes the case where the value for sigmask
specified is invalid (to match the requirements stated in the manpage
and POSIX), and also converts the parameter name -- mask -- to match
the manpage.
Thanks,
-Garrett

Index: compat-43/sigcompat.c
===================================================================
--- compat-43/sigcompat.c       (revision 210226)
+++ compat-43/sigcompat.c       (working copy)
@@ -99,12 +99,16 @@
 }

 int
-sigpause(int mask)
+sigpause(int sigmask)
 {
        sigset_t set;

+       if (!_SIG_VALID(sigmask)) {
+               errno = EINVAL;
+               return (-1);
+       }
        sigemptyset(&set);
-       set.__bits[0] = mask;
+       set.__bits[0] = sigmask;
        return (_sigsuspend(&set));
 }
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to