aboutsummaryrefslogtreecommitdiffstats
path: root/guts/execvp.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/execvp.c')
-rw-r--r--guts/execvp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/guts/execvp.c b/guts/execvp.c
index 64e4b4b..1ab34d3 100644
--- a/guts/execvp.c
+++ b/guts/execvp.c
@@ -6,7 +6,13 @@
* wrap_execvp(const char *file, 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_execvp(file, argv);