From: Jerry D. Hedden Date: Fri, 11 Jul 2008 11:07:07 +0000 (-0400) Subject: test.pl X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7e1027b93abc3d654a3d22e0f4534c8e96fb5e14;p=p5sagit%2Fp5-mst-13.2.git test.pl From: "Jerry D. Hedden" Message-ID: <1ff86f510807110807hb3e3727la161367a63da607f@mail.gmail.com> Jerry found that localizing $? doesn't shield the effects of wait() unless you actually assign something to $? p4raw-id: //depot/perl@34147 --- diff --git a/t/test.pl b/t/test.pl index e310f61..779933c 100644 --- a/t/test.pl +++ b/t/test.pl @@ -829,8 +829,8 @@ sub watchdog ($) # Add END block to parent to terminate and # clean up watchdog process - eval "END { local \$!; local \$?; - wait() if kill('KILL', $watchdog); }"; + eval "END { local \$! = 0; local \$? = 0; + wait() if kill('KILL', $watchdog); };"; return; } @@ -841,8 +841,8 @@ sub watchdog ($) if ($watchdog) { # Parent process # Add END block to parent to terminate and # clean up watchdog process - eval "END { local \$!; local \$?; - wait() if kill('KILL', $watchdog); }"; + eval "END { local \$! = 0; local \$? = 0; + wait() if kill('KILL', $watchdog); };"; return; }