diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-03-26 13:35:09 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-03-26 13:35:09 +0000 |
commit | e23052af8fb88e90e88f59671af5264d12eb7686 (patch) | |
tree | f4ae0be26d5debff091d2c976e77fa8050c6758c /runit | |
parent | 7588a049ebf057514cc194eb8835cfd85e954af8 (diff) | |
download | busybox-w32-e23052af8fb88e90e88f59671af5264d12eb7686.tar.gz busybox-w32-e23052af8fb88e90e88f59671af5264d12eb7686.tar.bz2 busybox-w32-e23052af8fb88e90e88f59671af5264d12eb7686.zip |
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).
git-svn-id: svn://busybox.net/trunk/busybox@18245 69ca8d6d-28ef-0310-b511-8ec308f3f277
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) | |||
310 | return 0; | 310 | return 0; |
311 | } | 311 | } |
312 | /* if (!(s.st_mode & S_IXUSR)) return 1; */ | 312 | /* if (!(s.st_mode & S_IXUSR)) return 1; */ |
313 | if ((pid = fork()) == -1) { | 313 | prog[0] = (char*)"./check"; |
314 | bb_perror_msg(WARN"cannot fork for %s/check", *service); | 314 | prog[1] = NULL; |
315 | pid = spawn(prog); | ||
316 | if (pid <= 0) { | ||
317 | bb_perror_msg(WARN"cannot %s child %s/check", "run", *service); | ||
315 | return 0; | 318 | return 0; |
316 | } | 319 | } |
317 | if (!pid) { | ||
318 | prog[0] = (char*)"./check"; | ||
319 | prog[1] = NULL; | ||
320 | close(1); | ||
321 | execve("check", prog, environ); | ||
322 | bb_perror_msg(WARN"cannot run %s/check", *service); | ||
323 | _exit(0); | ||
324 | } | ||
325 | while (wait_pid(&w, pid) == -1) { | 320 | while (wait_pid(&w, pid) == -1) { |
326 | if (errno == EINTR) continue; | 321 | if (errno == EINTR) continue; |
327 | bb_perror_msg(WARN"cannot wait for child %s/check", *service); | 322 | bb_perror_msg(WARN"cannot %s child %s/check", "wait for", *service); |
328 | return 0; | 323 | return 0; |
329 | } | 324 | } |
330 | return !wait_exitcode(w); | 325 | return !wait_exitcode(w); |