From: tytso@athena.mit.edu (Theodore Ts'o) Subject: Re: SUCCESS! dialin/dialout OK with new serial drivers 99p5 Date: 12 Feb 1993 01:09:13 -0500
From: devet@adv.win.tue.nl (Arjan de Vet)
Date: 11 Feb 93 22:58:34 GMT
*** /dev/cua1
This the new dial-out device. You can use it for Kermit, minicom, Seyon or
UUCP. Programs using this port should also NOT use O_NONBLOCK.
It actually doesn't matter whether or not they use O_NONBLOCK, at least,
not as far as whether or not he open() blocks or not. Using the
O_NONBLOCK will set the file descriptor to be in O_NONBLOCK mode, as
always, though.
The open() call on /dev/cua1 blocks when someone is dialling in on
/dev/ttyS1.
This is not quite true. The open() call on /dev/cua1 will return EBUSY
if someone is dialling in on /dev/ttyS1. The assumption is that getty
has the patience to wait until the line is free. A human user will not
be that patient, and will want to know right away that the line is busy.
PLEASE NOTE: many people will have a symlink /dev/modem to one of the
/dev/ttyS?? ports for dialing out. When upgrading to 99p5 you should change
this link to the corresponding /dev/cua?? device. To avoid any confusion
with the exact meaning of /dev/modem (is it the dial-in or dial-out device?)
I would recommend using the names ttyS? and cua?.
/dev/modem is a dialout device. A dialin device really needs to be
named /dev/tty*, or various programs may get confused. If your terminal
program is truly POSIX complaint, and can deal with an open() blocking
until carrier detect is raised --- unless the O_NONBLOCK flag is used
--- it is possible to run a terminal program using /dev/ttyS??. But
most terminal programs don't qualify as being fully POSIX complaint (not
even kermit), and it's much easier to change /dev/modem so that you're
using the callout devices.
- Ted