sxt(M)
sxt --
pseudo-device driver
Description
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 sxt driver.
sxt acts as a discipline manipulating a real tty
structure declared by a real device driver.
The sxt driver is currently only used by the
shl(C)
command.
Virtual ttys are named /dev/sxt?? or
/dev/sxt/?? (where ?? is a combination
of two digits, each in the range 0 ..7 ) and are allocated in groups
of up to eight.
Filenames end in three digits, where the first two digits
represent the group and the last digit represents the virtual tty
number of the group.
The /dev/sxt form of the name increases the size of /dev,
which adversely affects some commands;
the /dev/sxt/ form is not understood by most commands.
To allocate a group, a program should exclusively open a file with a name
of the form /dev/sxt??0 (channel 0) or /dev/sxt/??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.
ioctl commands
There are two groups of
ioctl(S)
commands supported by sxt.
The first group contains the standard ioctl commands described in
termio(M),
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 directives 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 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-
Where 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. 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.
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
/dev/sxt/??[0-7]-
/usr/include/sys/sxt.h-
driver specific definitions
See also
ioctl(S),
open(S),
shl(C),
stty(C),
termio(M)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003