to check for any waiting processes, and return immediately instead of blocking if there aren't any.use POSIX ":sys_wait_h"; waitpid(-1,WNOHANG);
Or, use a handler for $SIG{CHLD} to do your thing, and handle processes exiting as they come in.
In reply to Re^3: Waiting For Multiple Programs to Complete
by sgifford
in thread Waiting For Multiple Programs to Complete
by NathanE
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |