projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix usage of locks with vfork
[musl]
/
src
/
stdio
/
popen.c
diff --git
a/src/stdio/popen.c
b/src/stdio/popen.c
index
0c9f24e
..
5a47509
100644
(file)
--- a/
src/stdio/popen.c
+++ b/
src/stdio/popen.c
@@
-38,9
+38,9
@@
FILE *popen(const char *cmd, const char *mode)
__acquire_ptc();
pid = __vfork();
- __release_ptc();
if (pid) {
+ __release_ptc();
__syscall(SYS_close, p[1-op]);
sigprocmask(SIG_BLOCK, SIGALL_SET, &old);
if (pid < 0) {