summaryrefslogtreecommitdiff
path: root/initd
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-12 06:40:39 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-12 12:51:33 +0200
commita3437967a2ae4730ba638cc80328055e9805e7c9 (patch)
tree6e824f088920bb59fd00e0c3b03dcdbf859f74c1 /initd
parent55d4a328c9fa369611115a066f4f305f2b74dafd (diff)
Rely on PATH variable for running init programs
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'initd')
-rw-r--r--initd/runlst.c4
1 files changed, 1 insertions, 3 deletions
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);
}