X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fprocess%2Fwaitpid.c;h=5e0320f7b0bb9f2a935d61b73031425a92dddeee;hp=ec2757b3b30905310510668c6ed3f2f2d93b3a17;hb=b470030f839a375e5030ec9d44903ef7581c15a2;hpb=aa398f56fa398f2202b04e82c67f822f3233786f 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 #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; }