X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Fpopen.c;h=ca3cdf9d5e1e75ec0d1a8561c22b353455677585;hp=0c9f24e3062da16aab72a9369a750f94b2c19b75;hb=f1b23d41cff432a8d0939af427fa005b4a4f95d7;hpb=44eb4d8b9b7b3b539bcd4e311e9d7c8e2acf8d80 diff --git a/src/stdio/popen.c b/src/stdio/popen.c index 0c9f24e3..ca3cdf9d 100644 --- a/src/stdio/popen.c +++ b/src/stdio/popen.c @@ -38,11 +38,11 @@ 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); + sigprocmask(SIG_SETMASK, &old, 0); if (pid < 0) { fclose(f); return 0;