提交 f1b23d41 编写于 作者: R Rich Felker

fix copy/paste error in popen changes that broke signals

signal mask was not being restored after fork, but instead blocked again.
上级 2d321fa0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册