Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sxt(7) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

shl(1)

stty(1)

ioctl(2)

open(2)

line_push(3)

streams(7)

termio(7)




sxt(7) sxt(7)
NAME 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 used only 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 al- locate 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 multiplex- ing. Only one channel, the controlling channel, can receive input from the keyboard at a time; others attempting to read will be blocked. sxt supports two groups of ioctl(2) commands. The first group contains the standard ioctl commands described in ter- mio(7), with the following additions: TIOCEXCL Set exclusive use mode: permit no further opens until the file is closed. TIOCNXCL Reset exclusive use mode: permit further opens. The second group, which follows, are directives to sxt it- self. 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 argu- ment is the number of channels to allocate. This command may only be executed on chan- nel 0. Possible errors include EINVAL The argument is out of range. ENOTTY A real tty did not issue the com- mand. ENXIO sxt did not configure linesw. EBUSY Already issued an SXTIOCLINK command for this real tty. April, 1990 1



sxt(7) sxt(7)
ENOMEM There is no system memory available for allocating the virtual tty structures. EBADF Did not open channel 0 before this call. SXTIOCSWTCH Set the controlling channel. Possible er- rors include EINVAL Gave an invalid channel number. EPERM Did not execute the command from channel 0. SXTIOCWF Cause a channel to wait until it is the controlling channel. This command returns the error EINVAL if it is given an invalid channel number. SXTIOCUBLK Turn on the loblk control flag in the vir- tual tty of the indicated channel. SXTIOCUBLK Turn off the loblk control flag in the vir- tual tty of the indicated channel. Returns the error EINVAL if it is given an invalid number or channel 0. SXTIOCSTAT Get the status (blocked on input or output) of each channel and store the argument references in the sxtblock structure. Re- turns the error EFAULT if it cannot write the structure. SXTIOCTRACE Enable tracing. This command has no effect if tracing is not configured. SXTIOCNOTRACE Disable tracing. This command has no ef- fect if tracing is not configured. If the device driver is a streams device driver (see streams(7)) then it will respond to all the sxt ioctls list- ed earlier, provided they are made using the streams I_STR ioctl. To turn on shell layering on a streams device, first pop the normal line discipline off the stream, push the line discipline shlr onto the stream, and then push the line dis- cipline line back onto the stream. This open file descrip- tor will now become the controlling virtual tty. To open a slave virtual tty, open /dev/shl and push a line discipline onto it (using line_push(3), for example). /dev/shl is a clone device so a new virtual device will automatically be opened exclusively for you (TIOCEXCL is not required or sup- 2 April, 1990



sxt(7) sxt(7)
ported). FILES /dev/sxt/??[0-7] virtual tty devices /usr/include/sys/sxt.h driver-specific definitions /dev/shl SEE ALSO shl(1), stty(1), ioctl(2), open(2), line_push(3), streams(7), termio(7). April, 1990 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026