in reply to Safe Pipe Opens and Implicit Loops
I agree. It seems to me that retrying should be the job of a module, not that of builtins.
Mind you, the behaviour is not new. It dates back to at least Perl 3.
system also has this loop, but it doesn't warn.
fork does not have this loop.
Instead of hooking into the warning, you could use alarm.
Or you could avoid the issue completely by using open3 (since it wraps fork).
my $pid = open3(*KID_TO_WRITE, '>&STDOUT', '>&STDERR', '-'); ... waitpid($pid, 0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Safe Pipe Opens and Implicit Loops
by martin (Friar) on Jul 11, 2010 at 20:51 UTC | |
by Anonymous Monk on Jul 11, 2010 at 23:16 UTC |