Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jul 1995 13:54:37 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, terry@cs.weber.edu
Cc:        ache@astral.msk.su, hackers@freebsd.org, harry@hgac.com, jkh@violet.berkeley.edu
Subject:   Re: dial up at > 9600 baud
Message-ID:  <199507250354.NAA10084@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> New blocking opens have to sleep on that address too.  I thought you
>> meant to wake everything up.  Why do the wrong thing for new opens but
>> not for old opens?  It causes more obscure states that depend on
>> ancient history.  The same sleep address is used for DCD transitions
>> and all input events in 2.x.  Processes sleeping on it get woken up
>> unnecessarily and have to go back to sleep if DCD and CLOCAL are
>> still clear.

>Once the non-blocking-open flag has been set on the tty, it is not

There is no non-blocking flag on the tty in BSD.  The file flag
O_NONBLOCK controls blocking.  It may be different for different
instances of open().

>reset until the final close.  The flag for this is on the tty or

The file flag may be reset and set many times before the final close.
See fcntl(2).  The flag is passed to drivers for each read(), write(),
etc., so drivers see it as constant for each syscall.

>The sleep addresses must be different for the tty and the calling
>unit because of this.  Since comms outgoing and getty incoming use

They aren't.  They soon will be.

>> I did it in vfs because it can't be done in the driver.  The calling
>> and non-calling unit were and remain as logically separate as possible.
>> They have to block each other.

>I agree that they have to block each other, but this is done seperately
>at the vfs level.  The signals processing is at the bottom end of the VFS

vfs counting works fine for separate devices.  It fails for single devices
when a process is sleeping in open.

>If you're in there, the RI signal would be a nice option for the open
>complete instead of the DCD so we can write our own mgetty and get it
>right (no lock file cruft for incoming connections, PERIOD).

It's on my list.  select() on modem status change.  Best used on control/
status devices that you can look at without affecting the standard devices.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507250354.NAA10084>