diff options
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/waitid.c | 8 | ||||
-rw-r--r-- | src/process/waitpid.c | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/process/waitid.c b/src/process/waitid.c index b1e5e9b1..4fa7c024 100644 --- a/src/process/waitid.c +++ b/src/process/waitid.c @@ -1,7 +1,13 @@ #include <sys/wait.h> #include "syscall.h" +#include "libc.h" int waitid(idtype_t type, id_t id, siginfo_t *info, int options) { - return syscall(SYS_waitid, type, id, info, options, 0); + int r; + CANCELPT_BEGIN; + r = syscall(SYS_waitid, type, id, info, options, 0); + if (r<0) CANCELPT_TRY; + CANCELPT_END; + return r; } diff --git a/src/process/waitpid.c b/src/process/waitpid.c index ec2757b3..5e0320f7 100644 --- a/src/process/waitpid.c +++ b/src/process/waitpid.c @@ -1,7 +1,13 @@ #include <sys/wait.h> #include "syscall.h" +#include "libc.h" pid_t waitpid(pid_t pid, int *status, int options) { - return syscall(SYS_wait4, pid, status, options, 0); + int r; + CANCELPT_BEGIN; + r = syscall(SYS_wait4, pid, status, options, 0); + if (r<0) CANCELPT_TRY; + CANCELPT_END; + return r; } |