Expand description
Pseudo-Terminal (PTY) Support
Provides pseudo-terminal devices for terminal emulation and shell interaction.
§Architecture
A PTY pair consists of a master and a slave side. The master is used by a terminal emulator (or the graphical desktop renderer); the slave is used by the shell or application running inside the terminal.
Data flow:
- Master writes to
input_buffer→ slave reads frominput_buffer - Slave writes to
output_buffer→ master reads fromoutput_buffer
The PtyMasterNode and PtySlaveNode VfsNode wrappers expose these
buffers as regular file descriptors so that standard read/write
syscalls work transparently.
Modules§
- termios
- Terminal control characters
Structs§
- PtyManager
- PTY Manager for creating and managing PTY pairs
- PtyMaster
- PTY Master side (controlled by terminal emulator)
- PtyMaster
Node - VfsNode adapter for the master side of a PTY.
- PtySlave
- PTY Slave side (used by shell/application)
- PtySlave
Node - VfsNode adapter for the slave side of a PTY.
- Termios
Flags - PTY Terminal mode flags
- Winsize
- Window size information
Functions§
- init
- Initialize PTY system
- with_
pty_ manager - Execute a function with the PTY manager