WT doesn't close process handles to openconsole.exe #11966

Closed
opened 2026-01-31 03:02:39 +00:00 by claunia · 4 comments
Owner

Originally created by @vefatica on GitHub (Jan 5, 2021).

Environment

Microsoft Windows 10 Pro for Workstations
10.0.19042.685 (2009, 20H2)
WindowsTerminalPreview_1.5.3242.0_x64

Release version does it too.

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):

Any other software?

Steps to reproduce

Monitor WT's open "Process" handles while opening/closong new tabs or panes.

Expected behavior

WT will close its newly acquired handle to OpenConsole.exe

Actual behavior

WT does not close the handle

Using HANDLE64.EXE (Sysinternals, could also use their ProcessExplorer) ...

v:\> rem New Instance

v:\> handle64 -a -p windowsterminal.exe | findstr Process
  9DC: Process       OpenConsole.exe(10016)
  A04: Process       cmd.exe(3136)

v:\> rem Open a second tab

v:\> handle64 -a -p windowsterminal.exe | findstr Process
  9DC: Process       OpenConsole.exe(10016)
  A00: Process       OpenConsole.exe(9848)
  A04: Process       cmd.exe(3136)
  AC8: Process       cmd.exe(8480)

v:\> rem Close the newly opened tab

v:\> handle64 -a -p windowsterminal.exe | findstr Process
  9DC: Process       OpenConsole.exe(10016)
  A00: Process       <Non-existant Process>(9848)
  A04: Process       cmd.exe(3136)
Originally created by @vefatica on GitHub (Jan 5, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment Microsoft Windows 10 Pro for Workstations 10.0.19042.685 (2009, 20H2) WindowsTerminalPreview_1.5.3242.0_x64 Release version does it too. ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] Windows Terminal version (if applicable): Any other software? ``` # Steps to reproduce Monitor WT's open "Process" handles while opening/closong new tabs or panes. <!-- A description of how to trigger this bug. --> # Expected behavior WT will close its newly acquired handle to OpenConsole.exe <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior WT does not close the handle <!-- What's actually happening? --> Using HANDLE64.EXE (Sysinternals, could also use their ProcessExplorer) ... ``` v:\> rem New Instance v:\> handle64 -a -p windowsterminal.exe | findstr Process 9DC: Process OpenConsole.exe(10016) A04: Process cmd.exe(3136) v:\> rem Open a second tab v:\> handle64 -a -p windowsterminal.exe | findstr Process 9DC: Process OpenConsole.exe(10016) A00: Process OpenConsole.exe(9848) A04: Process cmd.exe(3136) AC8: Process cmd.exe(8480) v:\> rem Close the newly opened tab v:\> handle64 -a -p windowsterminal.exe | findstr Process 9DC: Process OpenConsole.exe(10016) A00: Process <Non-existant Process>(9848) A04: Process cmd.exe(3136) ```
claunia added the Needs-TriageResolution-Fix-CommittedNeeds-Tag-Fix labels 2026-01-31 03:02:39 +00:00
Author
Owner

@DHowett commented on GitHub (Jan 5, 2021):

How do you keep finding these things? Do you just routinely check out the handles for all the stuff you run on your machine?

I'm not complaining, but it is strange 😉

@DHowett commented on GitHub (Jan 5, 2021): _How do you keep finding these things?_ Do you just routinely check out the handles for all the stuff you run on your machine? I'm not complaining, but it _is_ strange :wink:
Author
Owner

@vefatica commented on GitHub (Jan 5, 2021):

I'm generally concerned with performance, especially that of apps which have captured my fancy in some way. And I have several tools (some my own) for observing performance (and I enjoy using them).

In this case, I was trying to find differences between instances of WT which use little CPU when idling and ones which use a lot of CPU when idling (see #8625).

@vefatica commented on GitHub (Jan 5, 2021): I'm generally concerned with performance, especially that of apps which have captured my fancy in some way. And I have several tools (some my own) for observing performance (and I enjoy using them). In this case, I was trying to find differences between instances of WT which use little CPU when idling and ones which use a lot of CPU when idling (see #8625).
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

:tada:This issue was addressed in #8707, which has now been successfully released as Windows Terminal v1.5.10271.0.🎉

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8707, which has now been successfully released as `Windows Terminal v1.5.10271.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.5.10271.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

:tada:This issue was addressed in #8707, which has now been successfully released as Windows Terminal Preview v1.6.10272.0.🎉

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8707, which has now been successfully released as `Windows Terminal Preview v1.6.10272.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.6.10272.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11966