m³OS docs GitHub

Component explorer

Terminal Stack

The terminal stack turns raw console I/O into an interactive environment people can actually use.

Responsibilities

  • Translate input and output streams into interactive terminal behavior.
  • Coordinate line discipline, TTY state, and shell-facing I/O.
  • Bridge kernel console primitives to userspace interaction.

The terminal stack is introduced in Userspace Entry and later touched by 15 phase(s).

Key files

  • kernel/src/stdin.rs — kernel/src/stdin.rs — kernel stdin buffer with line editing
  • userspace/shell/src/main.rs — sh0 (Phase 20 shell, renamed)
  • kernel/src/tty.rs — kernel/src/tty.rs — TTY0 global state
  • kernel-core/src/tty.rs — kernel-core/src/tty.rs — Termios, Winsize, EditBuffer, constants
  • userspace/stdin_feeder/src/main.rs — userspace/stdin_feeder/src/main.rs — Keyboard line discipline (userspace)
  • userspace/stdin_feeder/src/main.rs:220 — userspace/stdin_feeder/src/main.rs:220 — tcgetattr(0) called once at startup. c_cc array never refreshed.
  • userspace/stdin_feeder — Completed. userspace/stdin_feeder now forwards raw