commit | a1b16f4d5c0dd119f85f13c8cb1399a701a3e815 | [log] [tgz] |
---|---|---|
author | Denis Vlasenko <vda.linux@googlemail.com> | Tue Jul 31 17:09:44 2007 +0000 |
committer | Denis Vlasenko <vda.linux@googlemail.com> | Tue Jul 31 17:09:44 2007 +0000 |
tree | b306578a615c33768fbd00ca05f5fbfab3787267 | |
parent | f1f1b69dc12d489ef8b8cd1fb4114d404407e481 [diff] [blame] |
start_stop_daemon: NOMMU fix; smaller fixes
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index ea7b475..f7c6209 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c
@@ -244,8 +244,6 @@ { int fd; - fd = xopen(bb_dev_null, O_RDWR); - if (flags & DAEMON_CHDIR_ROOT) xchdir("/"); @@ -255,6 +253,8 @@ close(2); } + fd = xopen(bb_dev_null, O_RDWR); + while ((unsigned)fd < 2) fd = dup(fd); /* have 0,1,2 open at least to /dev/null */