Skip to content

prim_tty raw mode has no way to disable ISIG/IEXTEN/IXON, so control bytes (ctrl+o/ctrl+c/ctrl+s/q) cannot be read as data — regression from the OTP 28 shell improvements (PR #8962) #11512

Description

@gilbertwong96

Since OTP 28 (PR #8962), prim_tty's raw mode no longer has a way to disable ISIG, IEXTEN and IXON. The interactive shell is unaffected (ctrl+c and ctrl+d work as before), but applications that read raw keystrokes cannot receive control bytes as data: ctrl+o (VDISCARD), ctrl+c (SIGINT) and ctrl+s/ctrl+q (XON/XOFF) are consumed by the terminal driver.

OTP 26 had a sig option for this: sig => false cleared exactly those flags. PR #8962 dropped it during the options refactor, with no in-tree callers and no discussion. Third-party terminal UIs (IEx, Nerves, ...) lost the only way to get a full raw mode.

Repro: erl on a pty shows lflag=0x4c3 (ISIG/IEXTEN on). Sending 0x0f (ctrl+o) - the application receives nothing.

PR #11514 fixes this through the public shell:start_interactive/1 API: {noshell, #{mode => raw, signals => false}} disables ISIG/IEXTEN/IXON in raw mode (ENABLE_PROCESSED_INPUT on Windows), default true so shell behavior is unchanged. The option can be toggled at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssue not worked on by OTP; help wanted from the communityteam:VMAssigned to OTP team VM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions