Introduction
Introduction Statistics Contact Development Disclaimer Help
Use a double pointer - sinit - suckless init
git clone git://git.suckless.org/sinit
Log
Files
Refs
README
LICENSE
---
commit 0ffbe5d2badae771a94457573c3cf0cb382f1ad4
parent ce52673f5d443ab7f9b63fee013e82d02d71fd9f
Author: sin <[email protected]>
Date: Thu, 6 Feb 2014 12:24:55 +0000
Use a double pointer
Diffstat:
M sinit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git 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);
}
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.