Do waitpid() for ALL children, even if there are no threads waiting
authorAlan T. DeKok <aland@freeradius.org>
Thu, 11 Feb 2010 09:24:57 +0000 (10:24 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 11 Feb 2010 09:27:31 +0000 (10:27 +0100)
commitd6cc04ec5ec2eae5fcdc2f52683034b1715f2255
treea9e103de27a23737e70d0c8e9b861b6c03f1bd10
parent30c03d55e0e587777b043174c78b76461ba4bde5
Do waitpid() for ALL children, even if there are no threads waiting

i.e. call radius_exec_program() 4 times for each packet, each
with "nowait".  The "reap_children" function is called ONCE per packet,
and was calling waitpid() ONCE if there were no threads waiting
for a child.

This change makes it KEEP waiting until there are no more children
to wait for.
src/main/threads.c