in reply to Re^2: Waiting For Multiple Programs to Complete
in thread Waiting For Multiple Programs to Complete
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.
|
|---|