Closed rzhao271 closed 9 months ago
I have confirmed that I have moved the code to a part of the file that is called later:
I still have to test this PR, though.
I have tested the PR DisconnectNamedPipe causes the crash. I have removed those calls for now and added a comment referencing the issue.
Edit: DisconnectNamedPipe fails with error ERROR_INVALID_HANDLE. I wonder whether that means that after pfnClosePseudoConsole is called, the hIn and hOut handles are somehow invalidated?
Edit: I ran another experiment where I moved DisconnectNamedPipe back to the PtyKill implementation, and I got the error ERROR_ACCESS_DENIED.
Fixes https://github.com/microsoft/node-pty/issues/512