diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2008-07-11 07:07:07 -0400 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2008-07-16 14:11:13 +0000 |
commit | 7e1027b93abc3d654a3d22e0f4534c8e96fb5e14 (patch) | |
tree | 73bc105deb691c6f1bade0cde79b1b0daf3784c2 /t | |
parent | 7cd4b8a81868192f61186cc3b4b1135cd19beddc (diff) | |
download | perl-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
Diffstat (limited to 't')
-rw-r--r-- | t/test.pl | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |