runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit af44b352d720ba6e4be9572daacb62796bcb1aa0
parent 9856e5dbd51154ba061614bbc638d7beb27b8af6
Author: Gerrit Pape <pape@smarden.org>
Date:   Tue, 24 Sep 2002 14:12:05 +0000

support symlinked /service directory.

Diffstat:
Msrc/runsvdir.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/runsvdir.c b/src/runsvdir.c @@ -59,6 +59,9 @@ void runsv(int no, char *name) { /* child */ const char *prog[3]; + if (chdir(svdir) == -1) + fatal("unable to change directory to", svdir); + prog[0] ="runsv"; prog[1] =name; prog[2] =0; @@ -77,7 +80,7 @@ void runsvdir() { int i; struct stat s; - if (! (dir =opendir("."))) { + if (! (dir =opendir(svdir))) { warn("unable to open directory ", svdir); return; } @@ -177,8 +180,6 @@ int main(int argc, char **argv) { } } - if (chdir(svdir) == -1) - fatal("unable to change directory to ", svdir); for (;;) { /* collect children */