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:
[x] 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.
Ref https://github.com/microsoft/vscode/issues/123056
I noticed some handles were still being left open after killing a pwsh terminal in VS Code. This PR closes the
hIn
andhOut
handles duringPtyKill
. 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 callDisconnectNamedPipe
, and then callCloseHandle
after.Note that this fix at most helps with some cleanup during
PtyKill
, but it doesn't solve anything regardingPtyConnect
.Before merging:
automatic flow control
item. But, the same was happening for me even without the changes in this PR.