From: Michael Elkins Date: Tue, 10 Apr 2007 03:36:27 +0000 (-0700) Subject: Exit with a nonzero value if sending a message in batch mode fails (bug #2709). X-Git-Tag: mutt-1-5-16-rel~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f74c7d3563897df15e71eebd4e21db9bfa03d7b;p=mutt Exit with a nonzero value if sending a message in batch mode fails (bug #2709). --- diff --git a/main.c b/main.c index 66d77120..e84ac800 100644 --- a/main.c +++ b/main.c @@ -924,10 +924,13 @@ int main (int argc, char **argv) mutt_free_list (&attach); } - ci_send_message (sendflags, msg, tempfile, NULL, NULL); + int rv = ci_send_message (sendflags, msg, tempfile, NULL, NULL); if (!option (OPTNOCURSES)) mutt_endwin (NULL); + + if (rv) + exit(1); } else {