Skip to content

Commit

Permalink
send-email: send_message die on $!, not $?
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Sep 30, 2010
1 parent e9bf741 commit 5e2c2ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5e2c2ab

Please sign in to comment.