aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-10-29 03:45:33 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-10-29 03:45:33 +0000
commit58f3c2e01ee5c5d7f70ee3701b160c0e9d6e6e52 (patch)
tree953bf1f03b1692fa12e2abde017a0c168a4adbc7
parent9657596dd6e9f066082bcf7056412fe1411fa0ef (diff)
downloadbusybox-w32-58f3c2e01ee5c5d7f70ee3701b160c0e9d6e6e52.tar.gz
busybox-w32-58f3c2e01ee5c5d7f70ee3701b160c0e9d6e6e52.tar.bz2
busybox-w32-58f3c2e01ee5c5d7f70ee3701b160c0e9d6e6e52.zip
runsvdir: shrink (by Vladimir)
-rw-r--r--runit/runsvdir.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/runit/runsvdir.c b/runit/runsvdir.c
index d37eaf548..29e747fc1 100644
--- a/runit/runsvdir.c
+++ b/runit/runsvdir.c
@@ -98,14 +98,7 @@ static void warnx(const char *m1)
98 98
99static void runsv(int no, const char *name) 99static void runsv(int no, const char *name)
100{ 100{
101 pid_t pid; 101 pid_t pid = vfork();
102 char *prog[3];
103
104 prog[0] = (char*)"runsv";
105 prog[1] = (char*)name;
106 prog[2] = NULL;
107
108 pid = vfork();
109 102
110 if (pid == -1) { 103 if (pid == -1) {
111 warn2_cannot("vfork", ""); 104 warn2_cannot("vfork", "");
@@ -125,7 +118,7 @@ static void runsv(int no, const char *name)
125 | (1 << SIGTERM) 118 | (1 << SIGTERM)
126 , SIG_DFL); 119 , SIG_DFL);
127#endif 120#endif
128 execvp(prog[0], prog); 121 execlp("runsv", "runsv", name, NULL);
129 fatal2_cannot("start runsv ", name); 122 fatal2_cannot("start runsv ", name);
130 } 123 }
131 sv[no].pid = pid; 124 sv[no].pid = pid;