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

Don't close consoleR & consoleW in Windows #7

Merged
merged 2 commits into from
Apr 14, 2024

Conversation

HuckRidgeSW
Copy link

pty_windows.go closed consoleW and consoleR in the initial open(), with the comment "These pipes can be closed here without any worry."

This isn't actually true.

If you interact with the terminal via Go code (i.e. don't immediately fork a new process, but use (for example) github.com/mvdan/sh), you need those pipes to stay open, and to close them yourself.

pty_windows.go closed consoleW and consoleR in the initial open(), with
the comment "These pipes can be closed here without any worry."

This isn't actually true.

If you interact with the terminal via Go code (i.e. don't immediately
fork a new process, but use (for example) github.com/mvdan/sh), you need
those pipes to stay open, and to close them yourself.
@photostorm photostorm merged commit 871f917 into photostorm:master Apr 14, 2024
5 checks passed
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.

3 participants