Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly open winpty conin pipe in write-only mode - fixes #457 #460

Merged
merged 2 commits into from
Feb 16, 2021

Conversation

Eugeny
Copy link
Contributor

@Eugeny Eugeny commented Feb 13, 2021

Apparently the issue is caused by Node opening pipe sockets in RW mode by default.

One point to consider is whether the pipe should be open()ed synchronously - however I'm pretty sure opening a named pipe is always instantaneous. Swapping it for an asynchronous open means initial writes would have to be buffered somewhere first.

I've also added a test that fails on Node 14 with vanilla node-pty right now.

Fixes #457

@bryphe
Copy link

bryphe commented Feb 16, 2021

Nice find, @Eugeny - this fixes my usage of node-pty on NodeJS v14 as well - thank you!

@Tyriar Tyriar added this to the 1.0.0 milestone Feb 16, 2021
@Tyriar Tyriar merged commit 87990b2 into microsoft:master Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-ConPTY PTYs fail on node 14
3 participants