Subject: Re: Linux pseudo pty
To: Thor Lancelot Simon <>
From: Greywolf <>
List: tech-kern
Date: 02/19/2001 13:26:06
On Mon, 19 Feb 2001, Thor Lancelot Simon wrote:

# > They're not in the same device numberspace because they're not the same
# > devices.  The /dev/pts space is set up by ptmx which basically plumbs
# > a stream between device and process and effectively removes, i.e.,
# > the daemon from the loop, so it doesn't actually have to process anything
# > under Solaris.  The telnetd establishes the ptmx connection and then
# > hands all the back/forth communication to the kernel directly.  Since
# > the ssh processing layer is not built into the kernel, sshd uses
# > BSD-style ptys and has to remain alive and tend to the encryption.
# That's not really an accurate description.  While it is *possible* to push
# an arbitrary protocol-processing module onto a stream, the use of /dev/ptmx
# to acquire a file descriptor for a pty does not imply that any such push
# has occurred.
# You should look at what sshd (if you like), the Borman/MIT telnetd, or
# indeed any other portable program that uses ptys does on systems that
# don't provide BSD-style ptys.  /dev/ptmx is used, no magical modules are
# pushed, and everything works pretty much like it would with ptys done the
# BSD way.  Or see the Stevens book; there are good examples in there.

As usual, I stand enlightened.  I really need to expand my technical
library.  Thanks to all for your patience at my buffoonery.

*BSD: Power Your Net.