* Fix to init.c from Stuart Menefy <Stuart.Menefy@st.com> so that
authorEric Andersen <andersen@codepoet.org>
Tue, 4 Jul 2000 19:41:23 +0000 (19:41 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 4 Jul 2000 19:41:23 +0000 (19:41 -0000)
    it always sets the controlling terminal before running any programs
 -Erik

init.c
init/init.c

diff --git a/init.c b/init.c
index 2c275139122f8fda04033f8bba067e4655ac3922..26e4dc7a7b20143bc4abd30ad86169cb150cf38c 100644 (file)
--- a/init.c
+++ b/init.c
@@ -411,6 +411,7 @@ static pid_t run(char *command, char *terminal, int get_enter)
                dup2(fd, 0);
                dup2(fd, 1);
                dup2(fd, 2);
+               ioctl(0, TIOCSCTTY, 0);
                tcsetpgrp(0, getpgrp());
                set_term(0);
 
index 2c275139122f8fda04033f8bba067e4655ac3922..26e4dc7a7b20143bc4abd30ad86169cb150cf38c 100644 (file)
@@ -411,6 +411,7 @@ static pid_t run(char *command, char *terminal, int get_enter)
                dup2(fd, 0);
                dup2(fd, 1);
                dup2(fd, 2);
+               ioctl(0, TIOCSCTTY, 0);
                tcsetpgrp(0, getpgrp());
                set_term(0);