X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Fpopen.c;h=5a47509ed60d6249895df3c80e9d1c4b06ca917d;hp=0c9f24e3062da16aab72a9369a750f94b2c19b75;hb=599f97360389911c293e0ca4c5eb49e007377fba;hpb=ebee8c2b477807fe58fd35d35783633ea08b049c;ds=sidebyside diff --git a/src/stdio/popen.c b/src/stdio/popen.c index 0c9f24e3..5a47509e 100644 --- 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) {