Cygwin: handle_sigprocmask: If new signal set is NULL, ignore "how"
The "how" value only makes sense if a new set is given. If we only read the current signal set, ignore the value of "how" per POSIX: "If set is a null pointer, the value of the argument how is not significant" Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
25937aa1d0
commit
c78f149733
|
@ -205,15 +205,15 @@ sigprocmask (int how, const sigset_t *set, sigset_t *oldset)
|
||||||
int __reg3
|
int __reg3
|
||||||
handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& opmask)
|
handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& opmask)
|
||||||
{
|
{
|
||||||
/* check that how is in right range */
|
/* check that how is in right range if set is not NULL */
|
||||||
if (how != SIG_BLOCK && how != SIG_UNBLOCK && how != SIG_SETMASK)
|
if (set && how != SIG_BLOCK && how != SIG_UNBLOCK && how != SIG_SETMASK)
|
||||||
{
|
{
|
||||||
syscall_printf ("Invalid how value %d", how);
|
syscall_printf ("Invalid how value %d", how);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
__try
|
__try
|
||||||
{
|
{
|
||||||
if (oldset)
|
if (oldset)
|
||||||
*oldset = opmask;
|
*oldset = opmask;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue