This commit is contained in:
Ashish Kumar Yadav 2021-08-10 22:31:01 +05:30
parent f29d1b2138
commit 8df80c351e

View file

@ -836,7 +836,6 @@ externalpipe(const Arg *arg)
break;
}
close(fd[1]);
/* restore sigpipe handler */
signal(SIGPIPE, psigpipe);
}
@ -848,11 +847,9 @@ sigchld(int a)
pid_t p;
tmp = errno; /* waitpid might change errno */
while ((p = waitpid(-1, &stat, WNOHANG)) > 0)
if (p == pid)
goto check;
errno = tmp;
/* TODO: in die, printf and exit are not async-signal-safe */