Skip to content

Commit 5e2c2ab

Browse files
avargitster
authored andcommitted
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 <[email protected]: Avery Pennarun <[email protected]> Reviewed-by: Jeff King <[email protected]> > Signed-off-by: Junio C Hamano <[email protected]>
1 parent e9bf741 commit 5e2c2ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-send-email.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ sub send_message {
10351035
exec($smtp_server, @sendmail_parameters) or die $!;
10361036
}
10371037
print $sm "$header\n$message";
1038-
close $sm or die $?;
1038+
close $sm or die $!;
10391039
} else {
10401040

10411041
if (!defined $smtp_server) {

0 commit comments

Comments
 (0)