From c768ab20b40d915c7bf59e94e0c6621c95d2a8a3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 22 Sep 1999 16:55:13 +0000 Subject: 1999-09-22 Roland McGrath * getty.c (main): Make TTY our controlling terminal with TIOCSCTTY. --- daemons/getty.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'daemons') diff --git a/daemons/getty.c b/daemons/getty.c index e88810b5..d6706450 100644 --- a/daemons/getty.c +++ b/daemons/getty.c @@ -30,6 +30,7 @@ #include #include #include +#include /* XXX */ extern char *localhost (); @@ -94,6 +95,9 @@ main (int argc, char **argv) } while (tty == -1); + if (ioctl (tty, TIOCSCTTY) < 0) + syslog (LOG_ERR, "cannot set controlling terminal to %s: %m", ttyname); + print_banner (tty, ttyname); login_tty (tty); -- cgit v1.2.3