Skip to content

v0.7.0

Choose a tag to compare

@lenucksi lenucksi released this 17 Oct 15:14
· 102 commits to local/modernized since this release

[0.7.0] - 2026-10-17

Added

raw spawn option for PTY sessions

pty_spawn and the session-creation API accept raw: true, which disables the
PTY slave's line discipline (stty raw -echo) before the command runs. Use it for
a serial console (virsh console), a boot menu, or any program that expects a
\r to stay a \r.

Without it, the kernel's cooked discipline applies ICRNL and delivers Enter as
\n. A libvirt serial console showed its boot menu and relayed arrow keys, but
Enter did nothing - the byte was written and the program never saw it. Arrow keys
are escape sequences and are not translated, which is why only Enter was affected.
Raw mode turns ICRNL, ICANON, ISIG and ECHO off, so bytes arrive verbatim. It is
opt-in because a shell would lose line editing and the interrupt key.

pty_list and the <pty_spawned> result now report whether a session is raw.

Fixed

  • Enter works on a serial console reached through pty_spawn: the new raw option
    stops the line discipline from rewriting a carriage return into a line feed.