vzeventd: fix child handler to avoid zombies

Sometimes a signal is not delivered (and child_handler() is not called)
for every single child exited or terminated, which causes zombies to appear.

Use waitpid() and loop until all the children are properly reaped.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed