]> granicus.if.org Git - neomutt/commitdiff
Fix #828: Sendmail is now invoked with stdout and stderr redirected
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 17 Oct 2001 16:22:48 +0000 (16:22 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 17 Oct 2001 16:22:48 +0000 (16:22 +0000)
to /dev/null.  Apparently, sendmail 8.12.1 doesn't like to be
invoked with stderr and stdout closed.

sendlib.c

index 4a6df6e0e54ceb50ec8fb6131fce255159e03cd8..443ea981dd5c0a4a27df826c4142fa6ecc652737 100644 (file)
--- 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);