linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Does anyone still care about BSD ptys?
@ 2004-02-09  7:17 H. Peter Anvin
  2004-02-09  7:21 ` David Weinehall
                   ` (3 more replies)
  0 siblings, 4 replies; 37+ messages in thread
From: H. Peter Anvin @ 2004-02-09  7:17 UTC (permalink / raw)
  To: linux-kernel

Hi all,

Does anyone still care about old-style BSD ptys, i.e. /dev/pty*?  I'm
thinking of restructuring the pty system slightly to make it more
dynamic and to make use of the new larger dev_t, and I'd like to get
rid of the BSD ptys as part of the same patch.

	-hpa
-- 
PGP public key available - finger hpa@zytor.com
Key fingerprint: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
"The earth is but one country, and mankind its citizens."  --  Bahá'u'lláh
Just Say No to Morden * The Shadows were defeated -- Babylon 5 is renewed!!

^ permalink raw reply	[flat|nested] 37+ messages in thread
* Re: Does anyone still care about BSD ptys?
@ 2004-02-09 13:49 Albert Cahalan
  2004-02-09 17:14 ` H. Peter Anvin
  0 siblings, 1 reply; 37+ messages in thread
From: Albert Cahalan @ 2004-02-09 13:49 UTC (permalink / raw)
  To: linux-kernel mailing list; +Cc: hpa

H. Peter Anvin writes:

> Does anyone still care about old-style BSD ptys,
> i.e. /dev/pty*?  I'm thinking of restructuring
> the pty system slightly to make it more dynamic
> and to make use of the new larger dev_t, and
> I'd like to get rid of the BSD ptys as part of
> the same patch.

The BSD-style ptys are used all the time for
serial port emulation. The SysV-style ones are
useless for this, since they don't have a fixed
mapping from master to slave. You might make a
symlink from /dev/testbox to /dev/ptyp0, then
configure gdb to use /dev/testbox for remote
debugging. Then you start a remserial process
to connect /dev/ttyp0 with port 7455 on some
terminal server, and on the terminal server you
have remserial connect port 7455 to /dev/C7.
Now, whenever you run gdb, you're debugging
a test box over a serial line connected to the
terminal server. With SysV-style ttys, you
can't set up your config as nicely. The above
would likely have a few extra symlinks BTW.

In your use of the larger dev_t, please keep
the first 2047 or 2048 ptys as they are today.
Let the last major use the full 20-bit minor,
while restricting the first 7 minors to 8 bits.
This avoids breaking userspace software.

For example, due to the lack of /proc/*/tty links,
procps uses min+(maj-136)*256 to guess the number
of a SysV-style pty. A 32-bit dev_t will be handled
correctly by procps 3.2 if you extend the pty usage
as explained above.

Adding /proc/*/tty links solves the problem as
well, subject to a linux-2.7.0 version check.



^ permalink raw reply	[flat|nested] 37+ messages in thread
[parent not found: <c07c67$vrs$1@terminus.zytor.com.suse.lists.linux.kernel>]
* Re: Does anyone still care about BSD ptys?
@ 2004-02-09 16:57 Joerg Pommnitz
  2004-02-10 17:23 ` H. Peter Anvin
  0 siblings, 1 reply; 37+ messages in thread
From: Joerg Pommnitz @ 2004-02-09 16:57 UTC (permalink / raw)
  To: linux-kernel

HPA asked:
 > Does anyone still care about old-style BSD ptys, i.e. /dev/pty*? 

I do! I have an application that demultiplexes multiple serial streams
from a single one (to be exact this implements the multiplexing scheme
specified in 3GPP TS27.010 
(http://www.3gpp.org/ftp/Specs/latest/Rel-5/27_series/27010-500.zip).

The multiplexer uses old-style ptys to export the multiple streams 
to the applications (e.g. there are:
crw-rw-rw-    1 root     root       3, 236 May 21  2002 ttypMuxA0
crw-rw-rw-    1 root     root       3, 237 May 21  2002 ttypMuxA1
crw-rw-rw-    1 root     root       3, 238 May 21  2002 ttypMuxA2
crw-rw-rw-    1 root     root       3, 239 May 21  2002 ttypMuxA3
crw-rw-rw-    1 root     root       2, 236 May 21  2002 ptypMuxA0
crw-rw-rw-    1 root     root       2, 237 May 21  2002 ptypMuxA1
crw-rw-rw-    1 root     root       2, 238 May 21  2002 ptypMuxA2
crw-rw-rw-    1 root     root       2, 239 May 21  2002 ptypMuxA3).

It would be difficult to implement the same thing using SYSV ptys.

Regards
  Joerg


=====
-- 
Regards
       Joerg



	
		
Mit schönen Grüßen von Yahoo! Mail - http://mail.yahoo.de

^ permalink raw reply	[flat|nested] 37+ messages in thread
[parent not found: <1ne1M-1Oc-1@gated-at.bofh.it>]

end of thread, other threads:[~2004-02-11  5:31 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-09  7:17 Does anyone still care about BSD ptys? H. Peter Anvin
2004-02-09  7:21 ` David Weinehall
2004-02-09  7:29   ` H. Peter Anvin
2004-02-09  8:12     ` Ricky Beam
2004-02-09  8:19       ` H. Peter Anvin
2004-02-09  8:59 ` Miquel van Smoorenburg
2004-02-09 10:09   ` viro
2004-02-09 10:47     ` Miquel van Smoorenburg
2004-02-10  1:33     ` bill davidsen
2004-02-10  2:07       ` H. Peter Anvin
2004-02-09 18:06   ` Olaf Hering
2004-02-09  9:29 ` Nick Craig-Wood
2004-02-09 12:47   ` Jamie Lokier
2004-02-09 13:40     ` Nick Craig-Wood
2004-02-09 14:00       ` Richard B. Johnson
2004-02-09 17:51         ` Dominik Kubla
2004-02-09 18:27           ` Richard B. Johnson
2004-02-09 20:59             ` Athanasius
2004-02-10 11:16             ` Dominik Kubla
2004-02-10 17:19               ` H. Peter Anvin
2004-02-10  0:47 ` Karl Tatgenhorst
2004-02-10  0:52   ` H. Peter Anvin
2004-02-10  1:35     ` Karl Tatgenhorst
  -- strict thread matches above, loose matches on Subject: below --
2004-02-09 13:49 Albert Cahalan
2004-02-09 17:14 ` H. Peter Anvin
2004-02-09 17:18   ` Albert Cahalan
2004-02-09 20:32     ` Andries Brouwer
2004-02-10 11:40     ` Dominik Kubla
     [not found] <c07c67$vrs$1@terminus.zytor.com.suse.lists.linux.kernel>
     [not found] ` <c07i5r$ctq$1@news.cistron.nl.suse.lists.linux.kernel>
     [not found]   ` <20040209100940.GF21151@parcelfarce.linux.theplanet.co.uk.suse.lists.linux.kernel>
     [not found]     ` <20040209104729.GA19401@traveler.cistron.net.suse.lists.linux.kernel>
2004-02-09 14:45       ` Andi Kleen
2004-02-09 17:23         ` H. Peter Anvin
2004-02-09 16:57 Joerg Pommnitz
2004-02-10 17:23 ` H. Peter Anvin
     [not found] <1ne1M-1Oc-1@gated-at.bofh.it>
2004-02-10 19:47 ` Bill Davidsen
2004-02-10 19:51 ` Bill Davidsen
2004-02-10 21:52   ` Theodore Ts'o
2004-02-10 22:02     ` H. Peter Anvin
2004-02-11  5:31       ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).