in reply to Re: Confused by fork examples
in thread Confused by fork examples
I believe the 3rd block would be executed if fork failed because it would return undef not 0?
Update: Specifically, I am referring to your comment If fork gives an error, it will execute the first body; the third body is never executed. I now see your point. If the $pid is undef then ($pid == 0) won't work as intended. Thanks.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Confused by fork examples
by MidLifeXis (Monsignor) on Feb 20, 2009 at 18:20 UTC | |
by mr_mischief (Monsignor) on Feb 20, 2009 at 18:35 UTC |