Skip to content

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

Closed
@vefatica

Description

@vefatica

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-Tag-FixDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingResolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions