SXT(7) SXT(7)
NAME
sxt - pseudo-device driver
DESCRIPTION
The special file /dev/sxt is a pseudo-device driver that
interposes a discipline between the standard tty line
disciplines and a real device driver. The standard
disciplines manipulate virtual tty structures (channels)
declared by the /dev/sxt driver. /Dev/sxt acts as a
discipline manipulating a real tty structure declared by a
real device driver. The /dev/sxt driver is currently only
used by the shl(1) command.
Virtual ttys are named by inodes in the subdirectory
/dev/sxt and are allocated in groups of up to eight. To
allocate a group, a program should exclusively open a file
with a name of the form /dev/sxt/??0 (channel 0) and then
execute a SXTIOCLINK ioctl call to initiate the
multiplexing.
Only one channel, the controlling channel, can receive input
from the keyboard at a time; others attempting to read will
be blocked.
There are two groups of ioctl(2) commands supported by sxt.
The first group contains the standard ioctl commands
described in termio(7), with the addition of the following:
TIOCEXCL Set exclusive use mode: no further opens
are permitted until the file has been
closed.
TIOCNXCL Reset exclusive use mode: further opens
are once again permitted.
The second group are commands to sxt itself. Some of these
may only be executed on channel 0.
SXTIOCLINK Allocate a channel group and multiplex
the virtual ttys onto the real tty. The
Page 1 May 1989
SXT(7) SXT(7)
argument is the number of channels to
allocate. This command may only be
executed on channel 0. Possible errors
include:
EINVAL The argument is out of range.
ENOTTY The command was not issued
from a real tty.
ENXIO linesw is not configured with
sxt.
EBUSY An SXTIOCLINK command has
already been issued for this
real tty.
ENOMEM There is no system memory
available for allocating the
virtual tty structures.
EBADF Channel 0 was not opened
before this call.
SXTIOCSWTCH Set the controlling channel. Possible
errors include:
EINVAL An invalid channel number was
given.
EPERM The command was not executed
from channel 0.
SXTIOCWF Cause a channel to wait until it is the
controlling channel. This command will
return the error, EINVAL, if an invalid
channel number is given.
SXTIOCUBLK Turn off the loblk control flag in the
virtual tty of the indicated channel.
Page 2 May 1989
SXT(7) SXT(7)
The error EINVAL will be returned if an
invalid number or channel 0 is given.
SXTIOCSTAT Get the status (blocked on input or
output) of each channel and store in the
sxtblock structure referenced by the
argument. The error EFAULT will be
returned if the structure cannot be
written.
SXTIOCTRACE Enable tracing. Tracing information is
written to the console on the 3B2
Computer. This command has no effect if
tracing is not configured.
SXTIOCNOTRACE Disable tracing. This command has no
effect if tracing is not configured.
FILES
/dev/sxt/??[0-7] Virtual tty devices
SEE ALSO
termio(7).
shl(1), stty(1) in the User's Reference Manual.
ioctl(2), open(2) in the Programmer's Reference Manual.
Page 3 May 1989