aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-filter-driver.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index a46b3d23c8..a5730b0f11 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-20 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-filter-driver.c (pipe_to_system): Redirect the program's
+ stderr to /dev/null
+
2003-02-19 Jeffrey Stedfast <fejj@ximian.com>
* camel-tcp-stream-ssl.c (stream_connect): Fixed a type-o in the
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 63d96f5390..c6004a38df 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -679,9 +679,13 @@ pipe_to_system (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFil
if (!(pid = fork ())) {
/* child process */
GPtrArray *args;
- int maxfd;
+ int maxfd, fd;
- if (dup2 (fds[0], STDIN_FILENO) < 0 || dup2 (fds[3], STDOUT_FILENO) < 0)
+ fd = open ("/dev/null", O_WRONLY);
+
+ if (dup2 (fds[0], STDIN_FILENO) < 0 ||
+ dup2 (fds[3], STDOUT_FILENO) < 0 ||
+ dup2 (fd, STDERR_FILENO) < 0)
_exit (255);
setsid ();