Pty ports and TIOCUCNTL mode
Keith Muller
muller at sdcc7.ucsd.EDU
Mon Apr 18 03:21:56 AEST 1988
On 4.3 BSD this changes the reads on the master side pty to always be
preceeded by a extra byte. If the first byte on a read is a 0, then the
rest of the data is the result of a write on the slave side. A nonzero
first byte is the user ioctl sent. For example here are two ioctls for this
mode. WHen a slave side process does a ioctl(0, JBOOT, 0) the master
side on a read will see (JBOOT&0xff) as the first byte. JMPX is a special
case and is not passed through, it is used to detect is a psuedo port is
in the TIOCUCNTL mode.
#define JBOOT _IO(u, 1)
#define JMPX _IO(u, 0)
Watch out though, sun for example has decided to use this mode for
its on purposes and it it does not work this way.
Keith Muller
University of California
muller at ucsd.edu
More information about the Comp.unix.wizards
mailing list