diff options
Diffstat (limited to 'sysdeps/mach/hurd/sigsuspend.c')
-rw-r--r-- | sysdeps/mach/hurd/sigsuspend.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/sigsuspend.c b/sysdeps/mach/hurd/sigsuspend.c index 38f095ef09..ed98104dce 100644 --- a/sysdeps/mach/hurd/sigsuspend.c +++ b/sysdeps/mach/hurd/sigsuspend.c @@ -20,6 +20,7 @@ #include <hurd.h> #include <hurd/signal.h> #include <hurd/msg.h> +#include <sysdep-cancel.h> /* Change the set of blocked signals to SET, wait until a signal arrives, and restore the set of blocked signals. */ @@ -30,6 +31,7 @@ __sigsuspend (const sigset_t *set) sigset_t newmask, oldmask, pending; mach_port_t wait; mach_msg_header_t msg; + int cancel_oldtype; if (set != NULL) /* Crash before locking. */ @@ -59,8 +61,11 @@ __sigsuspend (const sigset_t *set) __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ()); /* Wait for the signal thread's message. */ + + cancel_oldtype = LIBC_CANCEL_ASYNC(); __mach_msg (&msg, MACH_RCV_MSG, 0, sizeof (msg), wait, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + LIBC_CANCEL_RESET (cancel_oldtype); __mach_port_destroy (__mach_task_self (), wait); /* Restore the old mask and check for pending signals again. */ |