Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!hplabs!qantel!ptsfa!ptsfb!rob From: rob@ptsfb.UUCP (Rob Bernardo) Newsgroups: net.unix-wizards Subject: Re: tty w/wo modem control inquiry Message-ID: <350@ptsfb.UUCP> Date: Mon, 14-Apr-86 09:07:33 EST Article-I.D.: ptsfb.350 Posted: Mon Apr 14 09:07:33 1986 Date-Received: Wed, 16-Apr-86 04:01:47 EST References: <979@rlgvax.UUCP> Reply-To: rob@ptsfb.UUCP (Rob Bernardo) Organization: Pacific Bell, San Francisco Lines: 29 In article <979@rlgvax.UUCP> dennis@rlgvax.UUCP (Dennis Bednar) writes: >What does a tty port *with* modem control mean, and >what does a tty port *without* modem control mean? "Modem control" means that the device to which the port is connected must indicate its ready state before certain i/o is allowed. If an rs-232 port has modem control, an open(2) on the port will block until the outboard device "asserts" data carrier detect (DCD), that is, until it puts a high voltage on on pin 8 of the rs-232 cable. However, if your open(2) uses the flag O_NDELAY, the open(2) will return without waiting for DCD to come high. BTW, this can be found on the manual page for open(2). Without modem control, the port can be opened, read from and written to without DCD being asserted. Furthermore, my experience on one system is that with modem control, if DCD is dropped after the open, and read(2)s or write(2)s to the port will block until DCD is restored. I suspect that if the port was opened with the O_NDELAY flag, read(2)s and write(2) will not block, but I don't know for sure since the system on which I have noticed the blocking of reading and writing has a bug that renders the O_NDELAY flag nonfunctional. The manual page for read(2) says something similar to this, and the manual page for write(2) says nothing about the effects of O_NDELAY on write(2)s to tty ports. Maybe someone else can detail how read(2) and write(2) are *supposed* to be affected of the O_NDELAY flag. Rob Bernardo, San Ramon, CA (415) 823-2417 {ihnp4|dual|qantel}!ptsfa!rob Pacific * Bell