From dada5414137a663dced9225b9656206401debac2 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 17 Oct 2001 16:22:48 +0000 Subject: [PATCH] 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. --- sendlib.c | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- 2.40.0