Skip to content

tty.ReadStream.setRawMode(true) on Unix does not disable tty output \n -> \r\n translation #63059

@samuel-williams-shopify

Description

Affected URL(s)

https://nodejs.org/api/tty.html

Description of the problem

When in raw mode, input is always available character-by-character, not including modifiers. Additionally, all special processing of characters by the terminal is disabled, including echoing input characters. Ctrl+C will no longer cause a SIGINT when in this mode.

This is wrong. Special processing of newline characters is still done and it is not binary safe.

See libuv/libuv#32 for historical context.

Note that I think this function name is misleading compared to user expectations, and there should be a way to have binary safe I/O (what raw mode normally is).

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions