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

Disconnect IO handles during PtyKill #510

Merged
merged 1 commit into from
Nov 12, 2021
Merged

Conversation

rzhao271
Copy link
Contributor

@rzhao271 rzhao271 commented Nov 11, 2021

Ref microsoft/vscode#123056

I noticed some handles were still being left open after killing a pwsh terminal in VS Code. This PR closes the hIn and hOut handles during PtyKill. I'm currently following the docs at https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipe-operations, which suggest that the server can call DisconnectNamedPipe, and then call CloseHandle after.

Note that this fix at most helps with some cleanup during PtyKill, but it doesn't solve anything regarding PtyConnect.

Before merging:

  • Ensure CI passes. When trying to run the tests locally on Windows, I noticed that they would get stuck on the automatic flow control item. But, the same was happening for me even without the changes in this PR.

@rzhao271 rzhao271 requested a review from Tyriar November 11, 2021 19:57
@rzhao271 rzhao271 self-assigned this Nov 11, 2021
@rzhao271 rzhao271 requested a review from meganrogge November 11, 2021 20:07
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.

2 participants