Explorar o código

fix copy/paste error in popen changes that broke signals

signal mask was not being restored after fork, but instead blocked again.
Rich Felker %!s(int64=12) %!d(string=hai) anos
pai
achega
f1b23d41cf
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/stdio/popen.c

+ 1 - 1
src/stdio/popen.c

@@ -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;