⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module pty

Module pty 

Source
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 from input_buffer
  • Slave writes to output_buffer → master reads from output_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)
PtyMasterNode
VfsNode adapter for the master side of a PTY.
PtySlave
PTY Slave side (used by shell/application)
PtySlaveNode
VfsNode adapter for the slave side of a PTY.
TermiosFlags
PTY Terminal mode flags
Winsize
Window size information

Functions§

init
Initialize PTY system
with_pty_manager
Execute a function with the PTY manager