8782: Remove WIFEXITED check from crunch-job reapchildren.
authorBrett Smith <brett@curoverse.com>
Fri, 1 Apr 2016 18:37:34 +0000 (14:37 -0400)
committerBrett Smith <brett@curoverse.com>
Fri, 1 Apr 2016 18:37:34 +0000 (14:37 -0400)
commit82225f2eeb39f6798ff83e979c28698ff617d414
treefa01c6d755c2ec6c2b8b2f08ad23a7fd5d69bc02
parenta74883043be4bfda29010adcd3627b4ad8923a29
8782: Remove WIFEXITED check from crunch-job reapchildren.

The intent of this check was to avoid reaping children that got
SIGSTOP.  But from the waitpid(2) man page, you must pass specific
flags for waitpid to return those children.  Without those flags,
waitpid will only return the pids of children that have terminated.

Meanwhile, WIFEXITED only returns true if the exit code indicates that
the child terminated normally.  It returns false if the child was
killed by a signal like SIGINT or SIGKILL.  This means children so
killed were not reaped by reapchildren, leading to infinite loops.
sdk/cli/bin/crunch-job