diff options
| author | John W. De Boskey <jwd@FreeBSD.org> | 2000-11-19 02:10:25 +0000 |
|---|---|---|
| committer | John W. De Boskey <jwd@FreeBSD.org> | 2000-11-19 02:10:25 +0000 |
| commit | 46ee285632f886ea1d489096a8e802533a049008 (patch) | |
| tree | 99a81e795e72841b76cb2d4befec076f6a4b2046 | |
| parent | aecbd999508cbf310fc9b0f4bf36c074e1790bd3 (diff) | |
Notes
| -rw-r--r-- | libexec/getty/main.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 68adab9049d7..d81256119ab7 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -444,7 +444,18 @@ opentty(const char *ttyn, int flags) return 0; } else { - login_tty(i); + if (login_tty(i) < 0) { + if (daemon(0,0) < 0) { + syslog(LOG_ERR,"daemon: %m"); + close(i); + return 0; + } + if (login_tty(i) < 0) { + syslog(LOG_ERR, "login_tty %s: %m", ttyn); + close(i); + return 0; + } + } return 1; } } |
