diff options
-rw-r--r-- | init/init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c index 7e24eacdd..1ecc43e16 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -735,6 +735,11 @@ static void exec_signal(int sig) | |||
735 | sigaddset(&unblock_signals, SIGTSTP); | 735 | sigaddset(&unblock_signals, SIGTSTP); |
736 | sigprocmask(SIG_UNBLOCK, &unblock_signals, NULL); | 736 | sigprocmask(SIG_UNBLOCK, &unblock_signals, NULL); |
737 | 737 | ||
738 | /* Close whatever files are open. */ | ||
739 | close(0); | ||
740 | close(1); | ||
741 | close(2); | ||
742 | |||
738 | /* Open the new terminal device */ | 743 | /* Open the new terminal device */ |
739 | if ((device_open(a->terminal, O_RDWR)) < 0) { | 744 | if ((device_open(a->terminal, O_RDWR)) < 0) { |
740 | if (stat(a->terminal, &sb) != 0) { | 745 | if (stat(a->terminal, &sb) != 0) { |