aboutsummaryrefslogtreecommitdiffstats
path: root/guts/execv.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/execv.c')
-rw-r--r--guts/execv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/guts/execv.c b/guts/execv.c
index 3fec52a..59a3f96 100644
--- a/guts/execv.c
+++ b/guts/execv.c
@@ -6,7 +6,13 @@
* wrap_execv(const char *path, char *const *argv) {
* int rc = -1;
*/
- environ = pseudo_setupenv(environ, getenv("PSEUDO_OPTS"));
+
+ if (!pseudo_get_value("PSEUDO_RELOADED"))
+ pseudo_setupenv();
+ else {
+ pseudo_setupenv();
+ pseudo_dropenv();
+ }
rc = real_execv(path, argv);