make sigsuspend a cancellation point
authorRich Felker <dalias@aerifal.cx>
Thu, 10 Mar 2011 16:01:11 +0000 (11:01 -0500)
committerRich Felker <dalias@aerifal.cx>
Thu, 10 Mar 2011 16:01:11 +0000 (11:01 -0500)
src/signal/sigsuspend.c

index 7ce526c4dd0408bcd819f69c556a580e51d4c753..0806288ce5754a164a355525d9677f893ca43ff8 100644 (file)
@@ -1,7 +1,12 @@
 #include <signal.h>
 #include "syscall.h"
+#include "libc.h"
 
 int sigsuspend(const sigset_t *mask)
 {
-       return syscall2(__NR_rt_sigsuspend, (long)mask, SYSCALL_SIGSET_SIZE);
+       int ret;
+       CANCELPT_BEGIN;
+       ret = syscall2(__NR_rt_sigsuspend, (long)mask, SYSCALL_SIGSET_SIZE);
+       CANCELPT_END;
+       return ret;
 }