From: jfc@athena.mit.edu (John F Carr) Subject: Re: The great serial device naming controversy.... Date: 31 May 1993 22:12:29 GMT
In article <1ubsh3INN9n8@senator-bedfellow.MIT.EDU> tytso@athena.mit.edu writes:
>Using the current convention /dev/tty[p-z][0-9a-f], there is room for
>176 PTY pairs, which is more than enough for any sane use of a PC. And
>if this convention is changed, it would require modifying and compiling
>every single program which attempts to allocate a pty, since it would
>mean deviating from the standard which nearly all Unix systems which
>have PTY's use. Given how difficult it would be, it's not worth it.
I like the AIX pty naming convention: if you want a pty, open /dev/ptc.
This allocates a new pty master; you can find the name of the pty slave
with a ttyname call. You get an effectively infinite number of ptys and
the code to allocate them is simpler. The tty slave names are of the form
/dev/pts/3. /dev/pt[sc] are special files, not directories; whatever is
left in the pathname ("/3" for "/dev/pts/3" is passed to the kernel open
routine).
--
John Carr (jfc@athena.mit.edu)