From 7e1027b93abc3d654a3d22e0f4534c8e96fb5e14 Mon Sep 17 00:00:00 2001 From: "Jerry D. Hedden" Date: Fri, 11 Jul 2008 07:07:07 -0400 Subject: [PATCH] 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 --- t/test.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.7.4