From b02c54ebeef845480a09690fe092071d823c1f0f Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 4 Jul 2000 19:41:23 +0000 Subject: [PATCH] * Fix to init.c from Stuart Menefy so that it always sets the controlling terminal before running any programs -Erik --- init.c | 1 + init/init.c | 1 + 2 files changed, 2 insertions(+) diff --git a/init.c b/init.c index 2c27513..26e4dc7 100644 --- 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); diff --git a/init/init.c b/init/init.c index 2c27513..26e4dc7 100644 --- a/init/init.c +++ b/init/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); -- 2.7.4