if all children exit, and the pidmap is empty, be sure that nr_running childs is 0
Check for fork() failure and just exit if it happens.