c has asked for the wisdom of the Perl Monks concerning the following question:
## wait on chid processes to exit while (wait() != -1) { return 1 if ($?); }
i see that return will return a value of 1 if there is a child process error held in $?, however the condition of the while is what confuses me. wait not equal to -1. so in one line its waiting, but checking on a value, and i am not sure where the value is coming from.
mad thanks! -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: what is this doing? - while (wait() != -1)
by Zaxo (Archbishop) on Feb 14, 2002 at 18:07 UTC | |
|
Re: what is this doing? - while (wait() != -1)
by lestrrat (Deacon) on Feb 14, 2002 at 18:08 UTC | |
|
Re: what is this doing? - while (wait() != -1)
by dragonchild (Archbishop) on Feb 14, 2002 at 18:02 UTC |