diff options
Diffstat (limited to 'runit')
-rw-r--r-- | runit/runsv.c | 7 | ||||
-rw-r--r-- | runit/runsvdir.c | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/runit/runsv.c b/runit/runsv.c index f83d58283..4155b8f43 100644 --- a/runit/runsv.c +++ b/runit/runsv.c | |||
@@ -251,7 +251,6 @@ static unsigned custom(struct svdir *s, char c) | |||
251 | int w; | 251 | int w; |
252 | char a[10]; | 252 | char a[10]; |
253 | struct stat st; | 253 | struct stat st; |
254 | char *prog[2]; | ||
255 | 254 | ||
256 | if (s->islog) return 0; | 255 | if (s->islog) return 0; |
257 | strcpy(a, "control/?"); | 256 | strcpy(a, "control/?"); |
@@ -267,13 +266,11 @@ static unsigned custom(struct svdir *s, char c) | |||
267 | /* child */ | 266 | /* child */ |
268 | if (haslog && dup2(logpipe.wr, 1) == -1) | 267 | if (haslog && dup2(logpipe.wr, 1) == -1) |
269 | warn_cannot("setup stdout for control/?"); | 268 | warn_cannot("setup stdout for control/?"); |
270 | prog[0] = a; | 269 | execl(a, a, (char *) NULL); |
271 | prog[1] = NULL; | ||
272 | execv(a, prog); | ||
273 | fatal_cannot("run control/?"); | 270 | fatal_cannot("run control/?"); |
274 | } | 271 | } |
275 | /* parent */ | 272 | /* parent */ |
276 | while (safe_waitpid(pid, &w, 0) == -1) { | 273 | if (safe_waitpid(pid, &w, 0) == -1) { |
277 | warn_cannot("wait for child control/?"); | 274 | warn_cannot("wait for child control/?"); |
278 | return 0; | 275 | return 0; |
279 | } | 276 | } |
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index 7b054e410..a77bc3fd8 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
@@ -119,7 +119,7 @@ static NOINLINE pid_t runsv(const char *name) | |||
119 | | (1 << SIGTERM) | 119 | | (1 << SIGTERM) |
120 | , SIG_DFL); | 120 | , SIG_DFL); |
121 | #endif | 121 | #endif |
122 | execlp("runsv", "runsv", name, NULL); | 122 | execlp("runsv", "runsv", name, (char *) NULL); |
123 | fatal2_cannot("start runsv ", name); | 123 | fatal2_cannot("start runsv ", name); |
124 | } | 124 | } |
125 | return pid; | 125 | return pid; |