projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use a_store to set cancel flag in pthread_cancel, to ensure a barrier
[musl]
/
src
/
process
/
waitpid.c
diff --git
a/src/process/waitpid.c
b/src/process/waitpid.c
index
ec2757b
..
5e0320f
100644
(file)
--- a/
src/process/waitpid.c
+++ b/
src/process/waitpid.c
@@
-1,7
+1,13
@@
#include <sys/wait.h>
#include "syscall.h"
#include <sys/wait.h>
#include "syscall.h"
+#include "libc.h"
pid_t waitpid(pid_t pid, int *status, int options)
{
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;
}
}