From 3cfe65e516a75696addcf0281674f644a0933ea5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 4 Feb 2010 02:05:22 +0000 Subject: [PATCH] * Doh! Calling `system' in an END block causes the exit status in $? to be changed to 0. --- scripts/ssh.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ssh.pm b/scripts/ssh.pm index cea486675..233c5a4aa 100644 --- a/scripts/ssh.pm +++ b/scripts/ssh.pm @@ -32,6 +32,6 @@ sub closeSSHConnection { } } -END { closeSSHConnection; } +END { my $saved = $?; closeSSHConnection; $? = $saved; } return 1;