From: Thomas Abraham Date: Mon, 6 May 2019 18:23:58 +0000 (-0400) Subject: Revert "lib/spawn.c run_command: don't loop forever if waitpid() is returning ECHILD" X-Git-Tag: 4.7~3^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d39357c840d3a529697144790f02307e5b8731b;p=thirdparty%2Fshadow.git Revert "lib/spawn.c run_command: don't loop forever if waitpid() is returning ECHILD" This reverts commit 1697c192acc763682ee9883aa94fe871246403c0. --- diff --git a/lib/spawn.c b/lib/spawn.c index 79f5054e7..fc4ad95c7 100644 --- a/lib/spawn.c +++ b/lib/spawn.c @@ -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",