about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/wait4.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/wait4.c')
-rw-r--r--sysdeps/mach/hurd/wait4.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/wait4.c b/sysdeps/mach/hurd/wait4.c
index 7cc969bf30..49c1b5d497 100644
--- a/sysdeps/mach/hurd/wait4.c
+++ b/sysdeps/mach/hurd/wait4.c
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <hurd.h>
 #include <hurd/port.h>
+#include <sysdep-cancel.h>
 
 pid_t
 __wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage)
@@ -29,10 +30,13 @@ __wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage)
   struct rusage ignored;
   int sigcode;
   int dummy;
+  int cancel_oldtype;
 
-  err = __USEPORT (PROC, __proc_wait (port, pid, options,
-				      stat_loc ?: &dummy, &sigcode,
-				      usage ?: &ignored, &dead));
+  cancel_oldtype = LIBC_CANCEL_ASYNC();
+  err = __USEPORT_CANCEL (PROC, __proc_wait (port, pid, options,
+					     stat_loc ?: &dummy, &sigcode,
+					     usage ?: &ignored, &dead));
+  LIBC_CANCEL_RESET (cancel_oldtype);
   switch (err)
     {
     case 0:			/* Got a child.  */