Files
neovim/src/nvim/os
tao 7be4e4dd65 fix(pty): prevent orphan conhost.exe on Windows 10 #38244
Problem:
On Windows 10, the ConPTY closing order is strict. Calling
ClosePseudoConsole after closing the output stream can easily
lead to accidental deadlocks, leaving orphan conhost.exe processes.
See https://learn.microsoft.com/en-us/windows/console/closepseudoconsole#remarks
and https://learn.microsoft.com/en-us/windows/console/creating-a-pseudoconsole-session#ending-the-pseudoconsole-session

Solution:
Based on the warning in the docs above, we need to call ClosePseudoConsole
on a separate thread first so that the output pipe can fully drain on
the main thread. Also, `wait_eof_timer` is outdated, so I removed it
to avoid extra cleanup logic around it (it was introduced in the
early winpty days).

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-03-20 18:42:41 -04:00
..
2024-01-11 21:37:23 +01:00
2023-11-12 21:26:39 +01:00
2023-11-28 22:23:56 +01:00
2023-11-27 15:50:45 +01:00