JBAS-479 clean up forked children in throttle_disbatcher.pl
authorBill Erickson <berickxx@gmail.com>
Fri, 27 Feb 2015 16:00:12 +0000 (08:00 -0800)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
commit3c9864f97c9b614c6002a9d7128fcff9b39cf98d
treec6f07f8e744377f70d527fb5eb1a8248fac0a42e
parent090b6766a0e492d1a2d427b6ecd39b3acac759ee
JBAS-479 clean up forked children in throttle_disbatcher.pl

When registering a sig handler for CHLD, we have to waitpid
for child procs to clean them up or defunct procs will proliferate.

Also update counts with each reaped child, since that's the only
accurate way to know how many children have completed their tasks.

See http://perldoc.perl.org/perlipc.html#Signals SIGCHLD

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/linking/throttle_disbatcher.pl