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-Tag: mutt-1-3-23-1-rel~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dada5414137a663dced9225b9656206401debac2;p=mutt 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 4a6df6e0..443ea981 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);