Skip Menu |

This queue is for tickets about the Proc-Simple CPAN distribution.

Report information
The Basics
Id: 33440
Status: resolved
Priority: 0/
Queue: Proc-Simple

People
Owner: Nobody in particular
Requestors: TJENNESS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: $? unreliable on program exit
We've noticed a problem whereby the exit status from a program using Proc::Simple can sometimes be odd if the THE_REAPER routine has trouble cleaning up a child process. Would it be possible for local($?); to be added to the top of THE_REAPER sub so that the exit status from waitpid does not leak out? The value of $? is captured in $EXIT_STATUS so I don't think there is any problem in localising $?. The perl manpage does warn that the value of $? will cause problems if signal handlers for SIGCHLD are installed. Tim
Please? I've just spent a week of my life rediscovering this bug triggered when a Proc::Simple cpan update overwrote my locally patched version of Proc::Simple. local($., $@, $!, $^E, $?); is even safer (and the version used in File::Temp). It would also be handy to add the above to the DESTROY method. Tim On Tue Feb 19 15:50:37 2008, TJENNESS wrote: Show quoted text
> We've noticed a problem whereby the exit status from a program using > Proc::Simple can > sometimes be odd if the THE_REAPER routine has trouble cleaning up a > child process. Would it > be possible for > > local($?); > > to be added to the top of THE_REAPER sub so that the exit status from > waitpid does not leak > out? The value of $? is captured in $EXIT_STATUS so I don't think > there is any problem in > localising $?. The perl manpage does warn that the value of $? will > cause problems if signal > handlers for SIGCHLD are installed. > > Tim
Please? I've just spent a week of my life rediscovering this bug triggered when a Proc::Simple cpan update overwrote my locally patched version of Proc::Simple. local($., $@, $!, $^E, $?); is even safer (and the version used in File::Temp). It would also be handy to add the above to the DESTROY method. Tim On Tue Feb 19 15:50:37 2008, TJENNESS wrote: Show quoted text
> We've noticed a problem whereby the exit status from a program using > Proc::Simple can > sometimes be odd if the THE_REAPER routine has trouble cleaning up a > child process. Would it > be possible for > > local($?); > > to be added to the top of THE_REAPER sub so that the exit status from > waitpid does not leak > out? The value of $? is captured in $EXIT_STATUS so I don't think > there is any problem in > localising $?. The perl manpage does warn that the value of $? will > cause problems if signal > handlers for SIGCHLD are installed. > > Tim