[HEADSUP] naming of tty devices.

Ruslan Ermilov ru at freebsd.org
Mon Sep 20 06:03:17 PDT 2004


On Mon, Sep 20, 2004 at 03:19:13PM +0300, Valentin Nechayev wrote:
>  Mon, Sep 20, 2004 at 14:09:02, phk wrote about "Re: [HEADSUP] naming of tty devices.": 
> 
> >>When restoring terminal device from this name, now it is possible yet
> >>to determine terminal testing /dev/tty$x or /dev/cua$x; with your new
> >>scheme this will be impossible totally.
> > No, that is exactly the way it will work, and which today it doesn't.
> > ttyd0 and cuad0 is the same device.  The difference between "tty"
> > and "cua" is how we react to DCD when opening.
> > You can never be
> > logged in vial both ttyd0 and cuad0 at the same time, so there is
> > no logging issue.
> 
> I say not for logging, but for restoring full terminal name from short name.
> E.g. listing processes controlled by this terminal. Whether /bin/ps will
> list processes for both callin and callout port, when got "-t d1"?
> 
I fail to see what will be different.  Currently, it works like this:

$ ps -tfoo
ps: /dev/ttyfoo and /dev/foo: No such file or directory
$ tty  
/dev/ttypo
$ ps -t/dev/ttypo
  PID  TT  STAT      TIME COMMAND
11104  po  Ss     0:00,07 -tcsh (tcsh)
11112  po  S      0:00,01 sh
11116  po  R+     0:00,00 ps -t/dev/ttypo

/*-
 * The user can specify a device via one of three formats:
 *     1) fully qualified, e.g.:     /dev/ttyp0 /dev/console
 *     2) missing "/dev", e.g.:      ttyp0      console
 *     3) two-letters, e.g.:         p0         co
 *        (matching letters that would be seen in the "TT" column)
 */

To answer your question: when given "-t d1", both now and then
it will convert it to /dev/ttyd1 and /dev/d1.  If you need
both callout and callin devices, "-t /dev/ttyd1 -t /dev/cuaa1"
should be used.  And you can always use "-O tty" to see the
full tty name.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20040920/a2a627e3/attachment.bin


More information about the freebsd-arch mailing list