aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-process.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-12-10 10:02:09 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-12-10 10:02:09 +0800
commit4a160e0e78504d65508156b7635b5689b41681a6 (patch)
treed92f537ef984b8348d80dd3c286ca1158fb0d2bb /camel/camel-stream-process.c
parentc074252e4fc21ddf87317cba976d26d101234165 (diff)
downloadgsoc2013-evolution-4a160e0e78504d65508156b7635b5689b41681a6.tar.gz
gsoc2013-evolution-4a160e0e78504d65508156b7635b5689b41681a6.tar.zst
gsoc2013-evolution-4a160e0e78504d65508156b7635b5689b41681a6.zip
remove dthe clearenv stuff, not sure why its there. s/setenv/putenv/ for
2003-12-10 Not Zed <NotZed@Ximian.com> * camel-stream-process.c (do_exec_command): remove dthe clearenv stuff, not sure why its there. s/setenv/putenv/ for portability. See Bug #51767. svn path=/trunk/; revision=23896
Diffstat (limited to 'camel/camel-stream-process.c')
-rw-r--r--camel/camel-stream-process.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/camel/camel-stream-process.c b/camel/camel-stream-process.c
index 6a48ae40d0..293cd2b69f 100644
--- a/camel/camel-stream-process.c
+++ b/camel/camel-stream-process.c
@@ -33,6 +33,7 @@
#include <sys/wait.h>
#include <fcntl.h>
#include <unistd.h>
+#include <stdlib.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
@@ -224,18 +225,8 @@ do_exec_command (int fd, const char *command, char **env)
/* Set up child's environment. We _add_ to it, don't use execle,
because otherwise we'd destroy stuff like SSH_AUTH_SOCK etc. */
- for ( ; env && *env; env++) {
- char *eq = strchr (*env, '=');
-
- if (!eq) {
- unsetenv (*env);
- continue;
- }
-
- *eq++ = '\0';
-
- setenv (*env, eq, 1);
- }
+ for ( ; env && *env; env++)
+ putenv(*env);
execl ("/bin/sh", "/bin/sh", "-c", command, NULL);