1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-05 15:16:34 +02:00

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>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2010-09-30 13:43:07 +00:00 committed by Junio C Hamano
parent e9bf741b88
commit 5e2c2ab159

View File

@ -1035,7 +1035,7 @@ sub send_message {
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) {