runsvdir: shrink (by Vladimir)
This commit is contained in:
parent
9657596dd6
commit
58f3c2e01e
@ -98,14 +98,7 @@ static void warnx(const char *m1)
|
|||||||
|
|
||||||
static void runsv(int no, const char *name)
|
static void runsv(int no, const char *name)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid = vfork();
|
||||||
char *prog[3];
|
|
||||||
|
|
||||||
prog[0] = (char*)"runsv";
|
|
||||||
prog[1] = (char*)name;
|
|
||||||
prog[2] = NULL;
|
|
||||||
|
|
||||||
pid = vfork();
|
|
||||||
|
|
||||||
if (pid == -1) {
|
if (pid == -1) {
|
||||||
warn2_cannot("vfork", "");
|
warn2_cannot("vfork", "");
|
||||||
@ -125,7 +118,7 @@ static void runsv(int no, const char *name)
|
|||||||
| (1 << SIGTERM)
|
| (1 << SIGTERM)
|
||||||
, SIG_DFL);
|
, SIG_DFL);
|
||||||
#endif
|
#endif
|
||||||
execvp(prog[0], prog);
|
execlp("runsv", "runsv", name, NULL);
|
||||||
fatal2_cannot("start runsv ", name);
|
fatal2_cannot("start runsv ", name);
|
||||||
}
|
}
|
||||||
sv[no].pid = pid;
|
sv[no].pid = pid;
|
||||||
|
Loading…
Reference in New Issue
Block a user