Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 95 20:55:15 MDT
From:      terry@cs.weber.edu (Terry Lambert)
To:        ache@astral.msk.su (=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= aka)
Cc:        bde@zeta.org.au, hackers@freebsd.org, harry@hgac.com, jkh@violet.berkeley.edu
Subject:   Re: dial up at > 9600 baud
Message-ID:  <9507250255.AA12936@cs.weber.edu>
In-Reply-To: <oWmu-4mSP1@astral.msk.su> from "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= aka" at Jul 24, 95 11:02:08 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >>>The Linux driver has (had?) some optional support to help getty handle
> >>>this.  After the last close of cuaa, sleeping opens of ttyd return
> >>>EAGAIN.  This gives getty a chance to send the AT command.
> 
> >>Does EAGAIN allowed on open by POSIX?
> 
> >No.  "... opening a terminal device file with the  O_NONBLOCK flag clear
> >shall cause the process to block until the terminal device is ready and
> >available.  The CLOCAL flag can also affect open()."  [Opening terminal
> >device files with O_NONBLOCK set is supposed to always work if the file
> >permissions allow it.  We probably break this by returning EBUSY for 
> >some exclusive access and bidirectional cases.]
> 
> Maybe we should allow open and return EBUSY on ioctls or writes?

A non-blocking open of the regular device when the calling unit
device is in use is to return EWOULDBLOCK.

A blocking open is to block until the calling unit is not busy
and an off-to-on transition of DCD has occurred following the
on-to-off-<delay>-on of the DTR from the calling unit close to ensure
that the DCD from the outgoing call is not misinterpreted by getty
as an incoming call.

The concept of "modem control" is seperate from the concept of
calling unit.

It seems the interpretation of POSIX above is being used incorrectly.
The flag in question is on the tty struct, *not* on the open.  The
O_NONBLOCK flag on the open is in a different section of the standard.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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