diff options
| author | jmcneill <jmcneill@NetBSD.org> | 2021-10-12 23:40:38 +0000 |
|---|---|---|
| committer | jmcneill <jmcneill@NetBSD.org> | 2021-10-12 23:40:38 +0000 |
| commit | a54c29887a6ac209c372706f0ff910ce19fac041 (patch) | |
| tree | 37142e7db54c04e2cb4551aaf0d43d3de34639f7 /libexec | |
| parent | 0d9085f5eea89bf0c8c04f47bb6083f47656e0f2 (diff) | |
getty: Remove 2 second sleep before opening tty
This (apparently very old!) workaround to ensure that DTR stays down long
enough to be detected is now handled by serial drivers themselves. For
console devices (framebuffer, serial console, etc) this was an unnecessary
2 second penalty that we have all been paying since the beginning of time.
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/getty/main.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 7da112870fc..cfffb3e9e7e 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.67 2020/02/26 15:44:57 riastradh Exp $ */ +/* $NetBSD: main.c,v 1.68 2021/10/12 23:40:38 jmcneill Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\ #if 0 static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93"; #else -__RCSID("$NetBSD: main.c,v 1.67 2020/02/26 15:44:57 riastradh Exp $"); +__RCSID("$NetBSD: main.c,v 1.68 2021/10/12 23:40:38 jmcneill Exp $"); #endif #endif /* not lint */ @@ -229,11 +229,6 @@ main(int argc, char *argv[], char *envp[]) if (ttyaction(ttyn, "getty", "root")) syslog(LOG_WARNING, "%s: ttyaction failed", ttyn); - /* - * Delay the open so DTR stays down long enough - * to be detected. - */ - (void)sleep(2); while ((i = open(ttyn, O_RDWR)) == -1) { if ((repcnt % 10 == 0) && (errno != ENXIO || !failopenlogged)) { |
