From a3437967a2ae4730ba638cc80328055e9805e7c9 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 12 Apr 2018 06:40:39 +0200 Subject: Rely on PATH variable for running init programs Signed-off-by: David Oberhollenzer --- initd/runlst.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'initd') diff --git a/initd/runlst.c b/initd/runlst.c index 933daeb..d1311a4 100644 --- a/initd/runlst.c +++ b/initd/runlst.c @@ -24,8 +24,6 @@ #include "init.h" -extern char **environ; - static int child_setup(const char *ctty) { sigset_t mask; @@ -65,7 +63,7 @@ static NORETURN void argv_exec(exec_t *e) argv[i] = ptr; argv[i] = NULL; - execve(argv[0], argv, environ); + execvp(argv[0], argv); perror(argv[0]); exit(EXIT_FAILURE); } -- cgit v1.2.3