Subject: | check for system() -1 in run3 breaks in forked child |
The change in ver 0.20 to die if the system() call returns -1 breaks code which uses run3 within a forked child process. This affects perl 5.8.7, 5.8.6, and earlier.
The offending line (517) checks "unless ( defined $r && $r != -1 ) {"
This breaks several things where we fork a child to run an external process.
The reason: system() returns -1 when called in a child process.
See perlbug http://rt.perl.org/rt3/Ticket/Display.html?id=36976
I can't suggest an ideal solution, but it would be useful to be able to tell run3 to not die when system() returns -1.