From: Thomas Roessler Date: Wed, 17 Oct 2001 16:22:48 +0000 (+0000) Subject: Fix #828: Sendmail is now invoked with stdout and stderr redirected X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49abecba47815b1faf2b0e01f43f78ed2422bcf4;p=neomutt Fix #828: Sendmail is now invoked with stdout and stderr redirected to /dev/null. Apparently, sendmail 8.12.1 doesn't like to be invoked with stderr and stdout closed. --- diff --git a/sendlib.c b/sendlib.c index 4a6df6e0e..443ea981d 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1831,6 +1831,13 @@ send_msg (const char *path, char **args, const char *msg, char **tempfile) if (dup (1) < 0) _exit (S_ERR); } + else + { + if (open ("/dev/null", O_WRONLY | O_APPEND) < 0) /* stdout */ + _exit (S_ERR); + if (open ("/dev/null", O_RDWR | O_APPEND) < 0) /* stderr */ + _exit (S_ERR); + } execv (path, args); _exit (S_ERR);