NetBSD-Users archive

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

Re: proposed change to getty



On 2021-10-13 23:18, Jared McNeill wrote:
On Wed, 13 Oct 2021, Johnny Billquist wrote:

You need to open the device to check to see if clocal is set.

Yes. Is that a problem?

With getty, it has to open the device anyway. And then it's just a question of doing a delay at close if it is not. Seems like the most natural thing.

It sleeps before opening the device to ensure that the last close had enough time to send the hangup signal. It doesn't actually close the device itself, as the tty stays open for exec of the login process.

Right. Maybe I should have been clearer.

Is that a problem? getty opens the device, and does the initial prompting. It then exec login, and when the child eventually exits, it waits a while before opening the device again.

So far, so good. So getty have the device open, it can check if it is local, it can wait before doing a new open if it is not local. Which seems like the most natural thing.

There - makes sense now?

The code is in src/libexec/getty/ if you care to look for yourself.

Yes. And I've read it before.

In a sense I am wondering what the problem is that you are facing and solving. A delay before a new login prompt when running with a video subsystem or serial console I believe. I agree that there is no need that there should be any delays here. But I do think that the proper answer to that is that these sessions are local, and that should be considered when getty waits or not. Because it is clear that if you truly have a modem hooked up to a serial port, then the delay is necessary, and it seems very reasonable that it would be in getty.

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index