summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2010-09-30 13:43:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-09-30 19:20:33 (GMT)
commit5e2c2ab1599f0a7a26b58adf1a3b9314e51bfb5e (patch)
treef52d768cedb890f444efd38982db4c170bb109f2 /git-send-email.perl
parente9bf741b887aadd227557804d3560ebd07b1dd09 (diff)
downloadgit-5e2c2ab1599f0a7a26b58adf1a3b9314e51bfb5e.zip
git-5e2c2ab1599f0a7a26b58adf1a3b9314e51bfb5e.tar.gz
git-5e2c2ab1599f0a7a26b58adf1a3b9314e51bfb5e.tar.bz2
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 <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 5a0c4a8..1e7adc2 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) {