fix copy/paste error in popen changes that broke signals
authorRich Felker <dalias@aerifal.cx>
Sun, 21 Oct 2012 17:23:03 +0000 (13:23 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 21 Oct 2012 17:23:03 +0000 (13:23 -0400)
signal mask was not being restored after fork, but instead blocked again.

src/stdio/popen.c

index 5a47509ed60d6249895df3c80e9d1c4b06ca917d..ca3cdf9d5e1e75ec0d1a8561c22b353455677585 100644 (file)
@@ -42,7 +42,7 @@ FILE *popen(const char *cmd, const char *mode)
        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;