summaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorDenis Vlasenko2008-10-29 03:45:33 +0000
committerDenis Vlasenko2008-10-29 03:45:33 +0000
commit58f3c2e01ee5c5d7f70ee3701b160c0e9d6e6e52 (patch)
tree953bf1f03b1692fa12e2abde017a0c168a4adbc7 /runit
parent9657596dd6e9f066082bcf7056412fe1411fa0ef (diff)
downloadbusybox-58f3c2e01ee5c5d7f70ee3701b160c0e9d6e6e52.zip
busybox-58f3c2e01ee5c5d7f70ee3701b160c0e9d6e6e52.tar.gz
runsvdir: shrink (by Vladimir)
Diffstat (limited to 'runit')
-rw-r--r--runit/runsvdir.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/runit/runsvdir.c b/runit/runsvdir.c
index d37eaf5..29e747f 100644
--- a/runit/runsvdir.c
+++ b/runit/runsvdir.c
@@ -98,14 +98,7 @@ static void warnx(const char *m1)
static void runsv(int no, const char *name)
{
- pid_t pid;
- char *prog[3];
-
- prog[0] = (char*)"runsv";
- prog[1] = (char*)name;
- prog[2] = NULL;
-
- pid = vfork();
+ pid_t pid = vfork();
if (pid == -1) {
warn2_cannot("vfork", "");
@@ -125,7 +118,7 @@ static void runsv(int no, const char *name)
| (1 << SIGTERM)
, SIG_DFL);
#endif
- execvp(prog[0], prog);
+ execlp("runsv", "runsv", name, NULL);
fatal2_cannot("start runsv ", name);
}
sv[no].pid = pid;