From: Ævar Arnfjörð Bjarmason Date: Thu, 30 Sep 2010 13:43:07 +0000 (+0000) Subject: send-email: send_message die on $!, not $? X-Git-Tag: v1.7.4-rc0~160^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5e2c2ab1599f0a7a26b58adf1a3b9314e51bfb5e;p=git.git send-email: send_message die on $!, not $? If close fails we want to emit errno, not the return code of whatever happened to be the child process run. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Jeff King > Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index 5a0c4a8ae..1e7adc209 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -1035,7 +1035,7 @@ X-Mailer: git-send-email $gitversion exec($smtp_server, @sendmail_parameters) or die $!; } print $sm "$header\n$message"; - close $sm or die $?; + close $sm or die $!; } else { if (!defined $smtp_server) {