aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-02-21 01:02:11 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-02-21 01:02:11 +0800
commit99a343eb815c833f54866d88bb222fa79947232c (patch)
tree9ab045257748f396923e2d280b1d26515c47a02d /camel
parent986f2ace070dfe610ffb7595e525a895d3a6fb43 (diff)
downloadgsoc2013-evolution-99a343eb815c833f54866d88bb222fa79947232c.tar.gz
gsoc2013-evolution-99a343eb815c833f54866d88bb222fa79947232c.tar.zst
gsoc2013-evolution-99a343eb815c833f54866d88bb222fa79947232c.zip
Redirect the program's stderr to /dev/null
2003-02-20 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (pipe_to_system): Redirect the program's stderr to /dev/null svn path=/trunk/; revision=19973
Diffstat (limited to 'camel')
-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 ();