aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-filter-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-filter-driver.c')
-rw-r--r--camel/camel-filter-driver.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 789ec90cba..75836dea67 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -692,12 +692,8 @@ pipe_to_system (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFil
setsid ();
maxfd = sysconf (_SC_OPEN_MAX);
- if (maxfd > 0) {
- for (fd = 0; fd < maxfd; fd++) {
- if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO)
- fcntl (fd, F_SETFD, FD_CLOEXEC);
- }
- }
+ for (fd = 3; fd < maxfd; fd++)
+ fcntl (fd, F_SETFD, FD_CLOEXEC);
args = g_ptr_array_new ();
for (i = 0; i < argc; i++)