in reply to Don't wait: waitpid. Why?
in thread Run N similar tasks in parallel
Possibility to make waitpid a non-blocking call?Ahh, yes. That's it. Although my little snippet of code would never need to wait for more than one process (it'll just loop the outer loop if the waited process is not one of our kids), there are times when I would change just that part of the loop to a "wait until there are no more kids" before moving on.
So, I'm a bit more familiar with waitpid now, and it makes it easy to step sideways to the multi-wait loop.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In Section Snippets Section