Revert "lib/spawn.c run_command: don't loop forever if waitpid() is returning ECHILD"
This reverts commit 1697c192ac
.
This commit is contained in:
parent
1697c192ac
commit
8d39357c84
@ -68,9 +68,8 @@ int run_command (const char *cmd, const char *argv[],
|
||||
|
||||
do {
|
||||
wpid = waitpid (pid, status, 0);
|
||||
} while ( ((pid_t)-1 == wpid && errno != ECHILD)
|
||||
&& (((pid_t)-1 == wpid && errno == EINTR)
|
||||
|| ((pid_t)-1 != wpid && wpid != pid)));
|
||||
} while ( ((pid_t)-1 == wpid && errno == EINTR)
|
||||
|| ((pid_t)-1 != wpid && wpid != pid));
|
||||
|
||||
if ((pid_t)-1 == wpid) {
|
||||
fprintf (stderr, "%s: waitpid (status: %d): %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user