diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-26 13:35:09 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-26 13:35:09 +0000 |
commit | 53091ecd20c294f0e0757a5f4e0d5c8c7b23b555 (patch) | |
tree | f4ae0be26d5debff091d2c976e77fa8050c6758c /runit | |
parent | ec1a4b5a521b5adf295bc757c25231910f8c854b (diff) | |
download | busybox-53091ecd20c294f0e0757a5f4e0d5c8c7b23b555.tar.gz |
Attempt to get more applets compile for NOMMU.
TODO_config_nommu documents what I managed to compile so far
(yay! msh works! cool). inetd, telnetd, httpd still do not compile. TODO
Also make fork(), daemon() produce warnings on compile stage
(in addition to erros on link stage).
Diffstat (limited to 'runit')
-rw-r--r-- | runit/sv.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/runit/sv.c b/runit/sv.c index 051e64e67..d52eb6d22 100644 --- a/runit/sv.c +++ b/runit/sv.c @@ -310,21 +310,16 @@ static int checkscript(void) return 0; } /* if (!(s.st_mode & S_IXUSR)) return 1; */ - if ((pid = fork()) == -1) { - bb_perror_msg(WARN"cannot fork for %s/check", *service); + prog[0] = (char*)"./check"; + prog[1] = NULL; + pid = spawn(prog); + if (pid <= 0) { + bb_perror_msg(WARN"cannot %s child %s/check", "run", *service); return 0; } - if (!pid) { - prog[0] = (char*)"./check"; - prog[1] = NULL; - close(1); - execve("check", prog, environ); - bb_perror_msg(WARN"cannot run %s/check", *service); - _exit(0); - } while (wait_pid(&w, pid) == -1) { if (errno == EINTR) continue; - bb_perror_msg(WARN"cannot wait for child %s/check", *service); + bb_perror_msg(WARN"cannot %s child %s/check", "wait for", *service); return 0; } return !wait_exitcode(w); |