Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* cuax vs ttySx
@ 1999-04-17 18:12 Ron Farrer
  1999-04-17 19:53 ` Multia serial ports Daniel J. Frasnelli
  1999-04-17 19:55 ` cuax vs ttySx Michal Jaegermann
  0 siblings, 2 replies; 4+ messages in thread
From: Ron Farrer @ 1999-04-17 18:12 UTC (permalink / raw)
  To: Red Hat Alpha Linux list


> actually, ttySx hasn't replaced cuax, cause it was always there. It 
> was supposed to be that ttySx was for incoming, cuax for outgoing, 
> each port had slightly different ioctl's/behaviour. 
>
> now cuax has been obsoleted, so your only choice is ttySx. (which 
> might become /dev/tts/x if devfs goes into 2.3) 

Could be, I alway's used cuax for modems/routers/etc. and ttysx for
terminals mostly because a few times cuax caused problems with some
terminals.

Thanks for the history correction! (lesson?)


-- Ron


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Multia serial ports
  1999-04-17 18:12 cuax vs ttySx Ron Farrer
@ 1999-04-17 19:53 ` Daniel J. Frasnelli
  1999-04-17 19:55 ` cuax vs ttySx Michal Jaegermann
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel J. Frasnelli @ 1999-04-17 19:53 UTC (permalink / raw)
  To: Red Hat Alpha Linux list

While we're on the subject of serial port madness, am I correct in 
assuming the port directly below keyboard on a PWS (Multia) is 
ttyS3? 

Bringing my first Linux box (old 386, some early SLS version) out of
retirement for use as a terminal :)

Dan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cuax vs ttySx
  1999-04-17 18:12 cuax vs ttySx Ron Farrer
  1999-04-17 19:53 ` Multia serial ports Daniel J. Frasnelli
@ 1999-04-17 19:55 ` Michal Jaegermann
  1999-04-17 20:30   ` Ron Farrer
  1 sibling, 1 reply; 4+ messages in thread
From: Michal Jaegermann @ 1999-04-17 19:55 UTC (permalink / raw)
  To: axp-list

Ron Farrer wrote:
> 
> > now cuax has been obsoleted, so your only choice is ttySx. (which 
> > might become /dev/tts/x if devfs goes into 2.3) 
> 
> Could be, I alway's used cuax for modems/routers/etc. and ttysx for
> terminals mostly because a few times cuax caused problems with some
> terminals.

'cuax' devices are really obsolete for a long time.  Mainly they
provide some primitive form of locking with ttySx devices; this locking
is more trouble than gain in any non-trivial situtation.

Ted Tso, who wrote the whole serial handler, describe once 'cuax'
devices as a "mistake" and tried quite hard to wean people from 'cuax'.
Persuasions did not seem to work so, in 2.2 kernels, any use of 'cuax'
logs an obnoxious message and these devices will be gone in future
kernel versions.  This should do it. :-)

Myself I am using /dev/ttySx for a long time and never had any problems.
We still probably need a slightly modified 'stty' which can open 
a serial port directly using O_NONBLOCK for situations when one got
stuck and CLOCAL is not set.  Normally 'stty' is used as
"stty <something, something> < /dev/ttyS1" and one cannot rely on a
shell that it will do that.  It might, but one never know.

Below is a detailed explanation from Ted about differences and pitfals
done better that I could have been able to. :-)  Note dates.

  Michal

Subject: Re: /dev/cua? Vs /dev/ttyS?
Date: Mon, 13 May 1996 19:51:04 +0200
Status: ROr

   Date:        Mon, 13 May 1996 07:57:09 +1000
   From: Tony Nugent <tonyn@sctnugen.ppp.gu.edu.au>

   Can someone kindly explain the difference between the /dev/cua? and
   /dev/ttyS? devices?

/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-mandated 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cuax vs ttySx
  1999-04-17 19:55 ` cuax vs ttySx Michal Jaegermann
@ 1999-04-17 20:30   ` Ron Farrer
  0 siblings, 0 replies; 4+ messages in thread
From: Ron Farrer @ 1999-04-17 20:30 UTC (permalink / raw)
  To: axp-list

On Sat, 17 Apr 1999, Michal Jaegermann wrote:

> 'cuax' devices are really obsolete for a long time.  Mainly they
> provide some primitive form of locking with ttySx devices; this locking
> is more trouble than gain in any non-trivial situtation.

Thanks for the info, I have updated my notes. BTW, I just noticed that Red
Hat's modemtool makes a link to cuax... (after all the talk I wanted to
see what RH thinks it should be). Anyone know who to contact at RH to get
that fixed?


Thanks again,

Ron Farrer


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-04-17 20:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-04-17 18:12 cuax vs ttySx Ron Farrer
1999-04-17 19:53 ` Multia serial ports Daniel J. Frasnelli
1999-04-17 19:55 ` cuax vs ttySx Michal Jaegermann
1999-04-17 20:30   ` Ron Farrer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox