Module Name:    src
Committed By:   jmcneill
Date:           Tue Oct 12 23:40:38 UTC 2021

Modified Files:
        src/libexec/getty: main.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/libexec/getty/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/getty/main.c
diff -u src/libexec/getty/main.c:1.67 src/libexec/getty/main.c:1.68
--- src/libexec/getty/main.c:1.67	Wed Feb 26 15:44:57 2020
+++ src/libexec/getty/main.c	Tue Oct 12 23:40:38 2021
@@ -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, 19
 #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)) {

Reply via email to