[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Single Page

Top Document: Mgetty+Sendfax with Vgetty Extensions (FAQ)
Previous Document: Why doesn't mgetty use the modem's autoanswer capabilities?
Next Document: Troubleshooting questions & answers


Why mgetty ignores /dev/tty* dialin, /dev/cua* dialout conventions:


[Under Linux and most other Unices (excepting SunOS) mgetty should be
set on the tty* devices, and the cua* devices should be ignored
entirely:]

From: "Theodore Y. Ts'o" <tytso@mit.edu>

/dev/ttySxx devices are fully POSIX-compliant TTY devices.  If you are
only going to be using one set of tty devices, you should be using
/dev/ttySxx. 

/dev/cuaXX devices are different from /dev/ttySXX in two ways --- first
of all, they will allow you to open the device even if CLOCAL is not set
and the O_NONBLOCK flag was not given to the open device.  This allows
programs that don't use the POSIX-mondated interface for opening
/dev/ttySxx devices to be able to use /dev/cuaXX to make outgoing phone
calls on their modem (cu stands for "callout", and is taken from SunOS).

The second way in which /dev/cuaXX differs from /dev/ttySXX is that if
they are used, they will trigger a simplistic kernel-based locking
scheme:  If /dev/ttySXX is opened by one or more processes, then an
attempt to open /dev/cuaXX will return EAGAIN.  If /dev/cuaXX is opened
by one or more processes, then an attempt to open /dev/ttySXX will
result the open blocking until /dev/cuaXX is closed, and the carrier
detect line goes high.

While this will allow for simple lockouts between a user using a modem
for callout and a getty listening on the line for logins, it doesn't
work if you need to arbitrate between multiple programs wanting to do
dialout --- for example, users wanting to do dialout and UUCP.

I originally implemented the cuaXX/ttySXX lockout mechanism back before
FSSTND established a standard convention for the use of tty lock files.
Now that it's there, people should use the tty lock files and not try
using /dev/cuaXX.  The only reason why /dev/cuaXX hasn't disappeared yet
is for backwards compatibility reasons.
						- Ted

[Under SunOS *everything* should use cua*, as follows:]
From: Gert Doering <gert@muc.de>

The two-device scheme is meant to prevent multiple processes from
accessing the same physical device at the same time. Since mgetty
opens the port with O_NDELAY, the kernel sees a process on tty*
(mgetty) and prevents any open() on cua* (uucico, cu, ...). So, you
have to use the same device for both program types, and that's cua*.



Top Document: Mgetty+Sendfax with Vgetty Extensions (FAQ)
Previous Document: Why doesn't mgetty use the modem's autoanswer capabilities?
Next Document: Troubleshooting questions & answers

Single Page


[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
Lichtenwalder@ACM.org

Last Update October 22 2009 @ 05:24 AM

Some parts © 2009 Advameg, Inc.