aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'init.c')
-rw-r--r--init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/init.c b/init.c
index b532ea88f..b3ae97d2e 100644
--- a/init.c
+++ b/init.c
@@ -411,6 +411,7 @@ static pid_t run(char *command, char *terminal, int get_enter)
411 411
412 if ((pid = fork()) == 0) { 412 if ((pid = fork()) == 0) {
413 /* Clean up */ 413 /* Clean up */
414 ioctl(0, TIOCNOTTY, 0);
414 close(0); 415 close(0);
415 close(1); 416 close(1);
416 close(2); 417 close(2);
@@ -430,7 +431,7 @@ static pid_t run(char *command, char *terminal, int get_enter)
430 dup2(fd, 0); 431 dup2(fd, 0);
431 dup2(fd, 1); 432 dup2(fd, 1);
432 dup2(fd, 2); 433 dup2(fd, 2);
433 ioctl(0, TIOCSCTTY, 0); 434 ioctl(0, TIOCSCTTY, 1);
434 tcsetpgrp(0, getpgrp()); 435 tcsetpgrp(0, getpgrp());
435 set_term(0); 436 set_term(0);
436 437