From owner-freebsd-hackers Mon Jul 24 20:02:46 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id UAA03844 for hackers-outgoing; Mon, 24 Jul 1995 20:02:46 -0700 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.11/8.6.6) with SMTP id UAA03836 for ; Mon, 24 Jul 1995 20:02:41 -0700 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA12936; Mon, 24 Jul 95 20:55:15 MDT From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9507250255.AA12936@cs.weber.edu> Subject: Re: dial up at > 9600 baud To: ache@astral.msk.su (=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= aka) Date: Mon, 24 Jul 95 20:55:15 MDT Cc: bde@zeta.org.au, hackers@freebsd.org, harry@hgac.com, jkh@violet.berkeley.edu In-Reply-To: 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 X-Mailer: ELM [version 2.4dev PL52] Sender: hackers-owner@freebsd.org Precedence: bulk > >>>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--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.