Skip to content

Allowing a TTY to be both readable and writable. #1936

@mcollina

Description

@mcollina
  • Version: 1.20.0+
  • Platform: Mac OS X, Linux

In versions < 1.20.0, libuv did not repsect the user stdio flags for new pipe, which was fixed in 8f9ba2a.
In Node.js both tty.ReadStream and tty.WriteStream are in fact Duplexes, with in theory one side closed. Because this was not enforced, both could work as a duplex.
This behavior has existed for so long that it might be considered a breaking change.

I think the best way to approach this is to add flags to uv_tty_init to support flags, so that we can create one that is both readable and writable at the same time and restore the behavior in Node.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions