aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix
diff options
context:
space:
mode:
Diffstat (limited to 'ports/unix')
-rw-r--r--ports/unix/guts/popen.c1
-rw-r--r--ports/unix/guts/system.c10
2 files changed, 4 insertions, 7 deletions
diff --git a/ports/unix/guts/popen.c b/ports/unix/guts/popen.c
index 05f0f6a..0ca16b0 100644
--- a/ports/unix/guts/popen.c
+++ b/ports/unix/guts/popen.c
@@ -5,7 +5,6 @@
* FILE *popen(const char *command, const char *mode)
* FILE *rc = NULL;
*/
-
/* on at least some systems, popen() calls fork and exec
* in ways that avoid our usual enforcement of the environment.
*/
diff --git a/ports/unix/guts/system.c b/ports/unix/guts/system.c
index 8b3607d..028b372 100644
--- a/ports/unix/guts/system.c
+++ b/ports/unix/guts/system.c
@@ -1,19 +1,17 @@
/*
- * Copyright (c) 2011 Wind River Systems; see
+ * Copyright (c) 2011, 2012 Wind River Systems; see
* guts/COPYRIGHT for information.
*
* int system(const char *command)
* int rc = -1;
*/
- /* We want to ensure that the child process implicitly
- * spawned has the right environment. So...
- */
- int pid;
-
if (!command)
return 1;
pseudo_setupenv();
+ if (pseudo_get_value("PSEUDO_UNLOAD"))
+ pseudo_dropenv();
+
rc = real_system(command);
/* return rc;