diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-25 23:21:05 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-25 23:21:05 +0000 |
commit | cad04ef4f3435e56181a81c896912543be34ea3c (patch) | |
tree | 71e46e02914c97077eaa77e12a726b29240b27f6 /runit/runsv.c | |
parent | 10f8f5f4433a88b9cf9048d38a45838aa6e2abf6 (diff) | |
download | busybox-w32-cad04ef4f3435e56181a81c896912543be34ea3c.tar.gz busybox-w32-cad04ef4f3435e56181a81c896912543be34ea3c.tar.bz2 busybox-w32-cad04ef4f3435e56181a81c896912543be34ea3c.zip |
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.c | 6 |
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) | |||
251 | return 0; | 251 | return 0; |
252 | } | 252 | } |
253 | if (!pid) { | 253 | if (!pid) { |
254 | if (haslog && fd_copy(1, logpipe[1]) == -1) | 254 | if (haslog && dup2(logpipe[1], 1) == -1) |
255 | warn_cannot("setup stdout for control/?"); | 255 | warn_cannot("setup stdout for control/?"); |
256 | prog[0] = a; | 256 | prog[0] = a; |
257 | prog[1] = NULL; | 257 | prog[1] = NULL; |
@@ -312,13 +312,13 @@ static void startservice(struct svdir *s) | |||
312 | /* child */ | 312 | /* child */ |
313 | if (haslog) { | 313 | if (haslog) { |
314 | if (s->islog) { | 314 | if (s->islog) { |
315 | if (fd_copy(0, logpipe[0]) == -1) | 315 | if (dup2(logpipe[0], 0) == -1) |
316 | fatal_cannot("setup filedescriptor for ./log/run"); | 316 | fatal_cannot("setup filedescriptor for ./log/run"); |
317 | close(logpipe[1]); | 317 | close(logpipe[1]); |
318 | if (chdir("./log") == -1) | 318 | if (chdir("./log") == -1) |
319 | fatal_cannot("change directory to ./log"); | 319 | fatal_cannot("change directory to ./log"); |
320 | } else { | 320 | } else { |
321 | if (fd_copy(1, logpipe[1]) == -1) | 321 | if (dup2(logpipe[1], 1) == -1) |
322 | fatal_cannot("setup filedescriptor for ./run"); | 322 | fatal_cannot("setup filedescriptor for ./run"); |
323 | close(logpipe[0]); | 323 | close(logpipe[0]); |
324 | } | 324 | } |