Skip to content

Losing keystrokes when using tty.ReadStream() over process.stdin #5574

@piranna

Description

@piranna
  • Version: checked on v0.12.10 and v4.3.2
  • Platform: Ubuntu Mate 15.10, x86 32bits
  • Subsystem: tty

I'm rewriting nsh as a POSIX shell for NodeOS. I create a tty.ReadStream instance using file descriptor from Readline.input, that at the same time it's initialized with process.stdin. Later I pause Readline.input, and although it doesn't emit 'data' events, if I exec an interactive command like nano or an instance of Node.js (or a recursive execution of the shell), some of the keystrokes are losed about 50% of the times (but it's random) and need to press them twice. Seems like there are several readers of stdin and someone is capturing the keystrokes that sbould end on the final command...

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues that need assistance from volunteers or PRs that need help to proceed.streamIssues and PRs related to the stream subsystem.ttyIssues and PRs related to the tty subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions