Skip to main content

Module pty_scheme

Module pty_scheme 

Source
Expand description

Pseudo-terminal (PTY) scheme.

A PTY pair consists of a master (controlling process) and a slave (child process). Data written to one side is readable from the other.

ยงScheme paths

PathDescription
/dev/pts/newOpen to allocate a new PTY pair (returns master fd).
/dev/pts/NOpen the slave side of PTY number N.
/dev/pts/List existing PTYs.

Structsยง

PtyPair ๐Ÿ”’
State of a single PTY pair.
PtyScheme
Manages all PTY pairs.
RingBuf ๐Ÿ”’
Ring buffer used for each direction of a PTY pair.

Constantsยง

PTY_BUF_SIZE ๐Ÿ”’

Staticsยง

PTY_SCHEME ๐Ÿ”’

Functionsยง

get_pty_scheme
Get a reference to the global PTY scheme instance.
init_pty_scheme
Initialize and mount the PTY scheme at /dev/pts.