C.DeRykus wrote:
> On Nov 9, 3:31 am, shawnhco...@gmail.com (Shawn H Corey) wrote:
>> redo if $kid != $child_pid;
> 
> Hm, I'm not sure why you'd want to 'redo' in the case of a
> blocking wait.  As I read the docs, a blocking wait on a
> specific pid returns only that pid if reaped normally or -1 if
> there's no such pid  (or that pid's been already reaped). In
> either case, I'd think you'd just want to continue processing
> the pid loop.

>From `perldoc -f waitpid`:

On some systems, a value of 0 indicates that there are processes still
running.

In other words, waitpid can return a value which is not the pid of the
child you requested.  Therefore redo, since it's a foreach loop.  This,
of course, is only true on some systems; it may not be true on yours.


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to