aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2012-03-28 16:47:38 -0500
committerPeter Seebach <peter.seebach@windriver.com>2012-03-28 16:47:38 -0500
commit0469c56bb9d1f575062060aadaf05aeee5a342b9 (patch)
tree2a3bc4efacadd9cd4923646e025edd3ff648c491 /ports
parentf0375c9aaefbccfd41aebbf6d332bb4d9e8f980c (diff)
downloadpseudo-0469c56bb9d1f575062060aadaf05aeee5a342b9.tar.gz
pseudo-0469c56bb9d1f575062060aadaf05aeee5a342b9.tar.bz2
pseudo-0469c56bb9d1f575062060aadaf05aeee5a342b9.zip
cleanup and fixes
Spotted a couple of things during the last batch of fixes; fixing these up so things are more consistent or clearer.
Diffstat (limited to 'ports')
-rw-r--r--ports/common/guts/execl.c5
-rw-r--r--ports/common/guts/execle.c5
-rw-r--r--ports/common/guts/execlp.c5
-rw-r--r--ports/unix/guts/popen.c1
-rw-r--r--ports/unix/guts/system.c10
5 files changed, 19 insertions, 7 deletions
diff --git a/ports/common/guts/execl.c b/ports/common/guts/execl.c
index ce908ed..be86b49 100644
--- a/ports/common/guts/execl.c
+++ b/ports/common/guts/execl.c
@@ -6,6 +6,11 @@
* int rc = -1;
*/
+ /* NOTE THAT THIS IS NEVER USED!
+ * We implement all execl() in terms of execv()
+ * so this call is not used.
+ */
+
rc = real_execl(file, arg, ap);
/* return rc;
diff --git a/ports/common/guts/execle.c b/ports/common/guts/execle.c
index 68d8bba..a3bc3ca 100644
--- a/ports/common/guts/execle.c
+++ b/ports/common/guts/execle.c
@@ -6,6 +6,11 @@
* int rc = -1;
*/
+ /* NOTE THAT THIS IS NEVER USED!
+ * We implement all execl() in terms of execv()
+ * so this call is not used.
+ */
+
rc = real_execle(file, arg, ap);
/* return rc;
diff --git a/ports/common/guts/execlp.c b/ports/common/guts/execlp.c
index d357986..3cf2889 100644
--- a/ports/common/guts/execlp.c
+++ b/ports/common/guts/execlp.c
@@ -6,6 +6,11 @@
* int rc = -1;
*/
+ /* NOTE THAT THIS IS NEVER USED!
+ * We implement all execl() in terms of execv()
+ * so this call is not used.
+ */
+
rc = real_execlp(file, arg, ap);
/* return rc;
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;