Closed
Description
Windows Terminal version
N/A
Windows build number
10.0.22631.4037 (Windows 11 Pro, 23H2)
Other Software
(None, just Kernel32)
Steps to reproduce
Run the EchoCon
sample and observe its handles before/after the ClosePseudoConsole
call.
- Add a breakpoint at
ClosePseudoConsole(hPC)
- Start debugging
- Run
handle.exe -p EchoCon.exe -a | findstr Process
when the program breaks atClosePseudoConsole(hPC)
- Step over
- Run
handle.exe -p EchoCon.exe -a | findstr Process
Expected Behavior
ClosePseudoConsole
closes the handle to conhost.exe.
Actual Behavior
ClosePseudoConsole
does not close the handle to conhost.exe (leaks the handle).
This looks like a Kernel32 version of #8706.
D:\>REM break just before ClosePseudoConsole(hPC)
D:\>handle -p EchoCon.exe -a | findstr Process
E0: Process conhost.exe(34388)
D:\>REM step over ClosePseudoConsole(hPC)
D:\>handle -p EchoCon.exe -a | findstr Process
E0: Process <Nonexistent process>(34388)
Metadata
Metadata
Assignees
Labels
It either shouldn't be doing this or needs an investigation.It's a new issue that the core contributor team needs to triage at the next triage meetingFor console issues specifically related to conptyIt's available in an Insiders build or a releaseFix is checked in, but it might be 3-4 weeks until a release.