diff options
-rw-r--r-- | daemons/getty.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 <stdlib.h> #include <string.h> #include <utmp.h> +#include <sys/ioctl.h> /* 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); |