summaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c
index dd92854..722ccd2 100644
--- a/init/init.c
+++ b/init/init.c
@@ -366,8 +366,9 @@ static pid_t run(char* command,
message(LOG|CONSOLE, "Bummer, can't open %s\r\n", terminal);
exit(1);
}
- dup(fd);
- dup(fd);
+ dup2(fd, 0);
+ dup2(fd, 1);
+ dup2(fd, 2);
tcsetpgrp (0, getpgrp());
set_term(0);