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:28:24 +0000 (10:28 +0100)
commit21c398222dd466458eabc499296b3ad25ec7a8b6
tree05e9f25f8e5820a9d49a5c3187b9099c9f6441da
parent839ee8ca88fb24f44f8d282030248eefac27140f
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