author | Rich Felker <dalias@aerifal.cx> | 2011年03月24日 14:18:00 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011年03月24日 14:18:00 -0400 |
commit | b470030f839a375e5030ec9d44903ef7581c15a2 (patch) | |
tree | 462b1df89a3ea45bcf50b9d0a844472576ed6585 /src/process/waitpid.c | |
parent | 095820016689dfdc9141f477a86de22054c86078 (diff) | |
download | musl-b470030f839a375e5030ec9d44903ef7581c15a2.tar.gz |
-rw-r--r-- | src/process/waitpid.c | 8 |
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; } |