aboutsummaryrefslogtreecommitdiffstats
path: root/nldev.c
diff options
context:
space:
mode:
Diffstat (limited to 'nldev.c')
-rw-r--r--nldev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/nldev.c b/nldev.c
index 1588ccc..296de4d 100644
--- a/nldev.c
+++ b/nldev.c
@@ -95,10 +95,8 @@ child(char *runpath)
if (dofork && !dodebug) {
fd = open("/dev/null", O_RDWR);
if (fd >= 0) {
- if (write(0, 0, 0) < 0)
- dup2(fd, 0);
- if (write(2, 0, 0) < 0)
- dup2(fd, 2);
+ dup2(fd, 1);
+ dup2(fd, 2);
if (fd > 2)
close(fd);
}