mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-10 17:31:56 +02:00
split: don’t worry about ECHILD
* src/split.c (closeout): There should be no need for a special case for ECHILD, since we never wait for the same child twice. Simplify with this in mind.
This commit is contained in:
@@ -553,10 +553,10 @@ closeout (FILE *fp, int fd, pid_t pid, char const *name)
|
||||
}
|
||||
if (pid > 0)
|
||||
{
|
||||
int wstatus = 0;
|
||||
if (waitpid (pid, &wstatus, 0) == -1 && errno != ECHILD)
|
||||
int wstatus;
|
||||
if (waitpid (pid, &wstatus, 0) < 0)
|
||||
die (EXIT_FAILURE, errno, _("waiting for child process"));
|
||||
if (WIFSIGNALED (wstatus))
|
||||
else if (WIFSIGNALED (wstatus))
|
||||
{
|
||||
int sig = WTERMSIG (wstatus);
|
||||
if (sig != SIGPIPE)
|
||||
|
||||
Reference in New Issue
Block a user