summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry D. Hedden <jdhedden@cpan.org>2008-07-11 07:07:07 -0400
committerSteve Hay <SteveHay@planit.com>2008-07-16 14:11:13 +0000
commit7e1027b93abc3d654a3d22e0f4534c8e96fb5e14 (patch)
tree73bc105deb691c6f1bade0cde79b1b0daf3784c2
parent7cd4b8a81868192f61186cc3b4b1135cd19beddc (diff)
downloadperl-7e1027b93abc3d654a3d22e0f4534c8e96fb5e14.tar.gz
test.pl
From: "Jerry D. Hedden" <jdhedden@cpan.org> 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
-rw-r--r--t/test.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/test.pl b/t/test.pl
index e310f61945..779933ce4d 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;
}