Firstly, you've changed your OP without indicating what you've changed. Please do not do this! It's perfectly OK to edit your nodes but do ensure you clearly mark what you've changed: "How do I change/delete my post?" explains the how and why of this.
"About the 'exit' statement, I have a 'next' in the parent's 'if' statement, so only the child reaches the 'exit'."
The exit statement is still not clearly bound to the child code. The exit statement is still in the subroutine definition. Is there a reason you do not wish to use return.
"The potential 'while' infinite loop - is there a better way to wait for the number of child processes to drop below the max?"
I've already suggested using sleep and alarm. Do you have a problem with that suggestion? If so, what is it?
-- Ken
In reply to Re^3: CHLD handler stopped working
by kcott
in thread CHLD handler stopped working
by halecommarachel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |