diff options
Diffstat (limited to 'libexec/getty')
-rw-r--r-- | libexec/getty/gettytab.h | 4 | ||||
-rw-r--r-- | libexec/getty/main.c | 12 |
2 files changed, 5 insertions, 11 deletions
diff --git a/libexec/getty/gettytab.h b/libexec/getty/gettytab.h index 33f797a4ec5c..6f393ce3b2e6 100644 --- a/libexec/getty/gettytab.h +++ b/libexec/getty/gettytab.h @@ -113,9 +113,9 @@ struct gettyflags { #define EP gettyflags[2].value #define EPset gettyflags[2].set #define OP gettyflags[3].value -#define OPset gettyflags[2].set +#define OPset gettyflags[3].set #define AP gettyflags[4].value -#define APset gettyflags[2].set +#define APset gettyflags[4].set #define EC gettyflags[5].value #define CO gettyflags[6].value #define CB gettyflags[7].value diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 18b35b8c58be..7c11279bc61e 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -143,9 +143,8 @@ main(argc, argv) int repcnt = 0; signal(SIGINT, SIG_IGN); -/* signal(SIGQUIT, SIG_DFL); -*/ + openlog("getty", LOG_ODELAY|LOG_CONS, LOG_AUTH); gethostname(hostname, sizeof(hostname)); if (hostname[0] == '\0') @@ -168,10 +167,6 @@ main(argc, argv) chown(ttyn, 0, 0); chmod(ttyn, 0600); revoke(ttyn); - /* - * Delay the open so DTR stays down long enough to be detected. - */ - sleep(2); while ((i = open(ttyn, O_RDWR)) == -1) { if (repcnt % 10 == 0) { syslog(LOG_ERR, "%s: %m", ttyn); @@ -242,9 +237,9 @@ main(argc, argv) if (getname()) { register int i; - oflush(); alarm(0); signal(SIGALRM, SIG_DFL); + oflush(); if (name[0] == '-') { puts("user names may not start with '-'."); continue; @@ -253,7 +248,6 @@ main(argc, argv) continue; set_tmode(2); ioctl(0, TIOCSLTC, <c); - signal(SIGINT, SIG_DFL); for (i = 0; environ[i] != (char *)0; i++) env[i] = environ[i]; makeenv(&env[i]); @@ -262,9 +256,9 @@ main(argc, argv) syslog(LOG_ERR, "%s: %m", LO); exit(1); } + signal(SIGINT, SIG_IGN); alarm(0); signal(SIGALRM, SIG_DFL); - signal(SIGINT, SIG_IGN); if (NX && *NX) tname = NX; } |