aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-02-06 12:24:55 +0000
committersin <sin@2f30.org>2014-02-06 12:24:55 +0000
commit0ffbe5d2badae771a94457573c3cf0cb382f1ad4 (patch)
tree38f09ad0a7535b53c8ae930f12d6de67b74ab4c9
parentce52673f5d443ab7f9b63fee013e82d02d71fd9f (diff)
Use a double pointer
-rw-r--r--sinit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sinit.c b/sinit.c
index c255205..be278bb 100644
--- a/sinit.c
+++ b/sinit.c
@@ -102,7 +102,7 @@ static void
spawn(const Arg *arg)
{
pid_t pid;
- const char *p = arg->v;
+ char *const *p = arg->v;
pid = fork();
if (pid < 0)
@@ -110,7 +110,7 @@ spawn(const Arg *arg)
if (pid == 0) {
setsid();
setpgid(0, 0);
- execvp(p, arg->v);
+ execvp(*p, p);
weprintf("sinit: execvp %s:", p);
_exit(errno == ENOENT ? 127 : 126);
}