summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2023-04-02 13:29:39 -0400
committerJakob Kaivo <jkk@ung.org>2023-04-02 13:29:39 -0400
commitf1580e611a3d5e41881f535969df960723c8dea7 (patch)
treed74993f8545eb632d8b01fa6d68d99ed42f09f2b
parent3a34cf9cbffae162ac0727c02fa43c189cd0c454 (diff)
include environment
-rw-r--r--parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index c8f9201..3fae890 100644
--- a/parse.c
+++ b/parse.c
@@ -145,7 +145,8 @@ int sh_simple_command(struct simple_command *c)
pid_t pid = fork();
if (pid == 0) {
- execv(path, c->we.we_wordv/*, exported_environ*/);
+ extern char **environ;
+ execve(path, c->we.we_wordv, environ);
fprintf(stderr, "sh: %s: %s\n", path, strerror(errno));
exit(1);
}