aboutsummaryrefslogtreecommitdiff
path: root/runit/runsv.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-25 23:21:05 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-25 23:21:05 +0000
commitcad04ef4f3435e56181a81c896912543be34ea3c (patch)
tree71e46e02914c97077eaa77e12a726b29240b27f6 /runit/runsv.c
parent10f8f5f4433a88b9cf9048d38a45838aa6e2abf6 (diff)
downloadbusybox-cad04ef4f3435e56181a81c896912543be34ea3c.tar.gz
add NOMMU fixme's; move move_fd from runit_lib to libbb; nuke fd_copy
Diffstat (limited to 'runit/runsv.c')
-rw-r--r--runit/runsv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/runit/runsv.c b/runit/runsv.c
index cd806851e..018456847 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -251,7 +251,7 @@ static unsigned custom(struct svdir *s, char c)
return 0;
}
if (!pid) {
- if (haslog && fd_copy(1, logpipe[1]) == -1)
+ if (haslog && dup2(logpipe[1], 1) == -1)
warn_cannot("setup stdout for control/?");
prog[0] = a;
prog[1] = NULL;
@@ -312,13 +312,13 @@ static void startservice(struct svdir *s)
/* child */
if (haslog) {
if (s->islog) {
- if (fd_copy(0, logpipe[0]) == -1)
+ if (dup2(logpipe[0], 0) == -1)
fatal_cannot("setup filedescriptor for ./log/run");
close(logpipe[1]);
if (chdir("./log") == -1)
fatal_cannot("change directory to ./log");
} else {
- if (fd_copy(1, logpipe[1]) == -1)
+ if (dup2(logpipe[1], 1) == -1)
fatal_cannot("setup filedescriptor for ./run");
close(logpipe[0]);
}