Date: Mon, 11 Oct 2021 18:09:23 -0300 (ADT) From: Jared McNeill <jmcne...@invisible.ca> Message-ID: <5ab793c9-8cab-2e79-e6ba-8017d924b...@invisible.ca>
| There's a 2 second sleep in getty before opening the tty | that has been there since before NetBSD I don't recall if that was there when this version of getty was created or not -- probably, in which case it was probably also in the 7th edition getty. That all got done about 40 years ago, far too long to remember. 2 secs back then was the smallest sleep that was guaranteed to be > 0 (the delay for sleep(n) was between n-1 and n secs). Since that is no longer true, the smallest change that should happen is s/2/1/, or use usleep() or nanosleep() and make the delay even smaller, 200ms should be enough for any modem. Doing it in the driver is OK as well, but probably needs to remain in getty until we are sure that all drivers do this correctly. Since you are handling this by blocking open until long enough after the close had passed, also delaying the open in getty should have no real effect. kre