NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: proposed change to getty



On Tue, Oct 12, 2021 at 4:33 AM Robert Elz <kre%munnari.oz.au@localhost> wrote:
>
>     Date:        Mon, 11 Oct 2021 18:09:23 -0300 (ADT)
>     From:        Jared McNeill <jmcneill%invisible.ca@localhost>
>     Message-ID:  <5ab793c9-8cab-2e79-e6ba-8017d924bdc2%invisible.ca@localhost>
>
>   | 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

Do you mean modem like a telephone modem or modem like a serial port?


Home | Main Index | Thread Index | Old Index