WindowsTerminal.exe leak (never exit) after the wtd.exe new-tab ... command line process exits. #20977

Open
opened 2026-01-31 07:29:30 +00:00 by claunia · 0 comments
Owner

Originally created by @ShenHongFei on GitHub (Dec 12, 2023).

Windows Terminal version

latest commit of main branch

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

Execute the following command on the command line:

wtd.exe new-tab ping.exe localhost

Expected Behavior

There is only one WindowsTerminal.exe process after the ping command ends

Actual Behavior

Each time the above command is executed, there will be one more WindowsTerminal.exe process.

I debugged the redundant WindowsTerminal.exe process and found that it was stuck on the line highlighted in the picture below.
D:\1\winterm\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\include\wil\filesystem.h

image

I guessed it might be related to Microsoft.Windows.ImplementationLibrary, and then revert this PR https://github.com/microsoft/terminal/pull/16120
After recompiling and building, the problem disappeared and there were no redundant leaking processes.

Originally created by @ShenHongFei on GitHub (Dec 12, 2023). ### Windows Terminal version latest commit of main branch ### Windows build number 10.0.22631.0 ### Other Software _No response_ ### Steps to reproduce Execute the following command on the command line: ``` wtd.exe new-tab ping.exe localhost ``` ### Expected Behavior There is only one WindowsTerminal.exe process after the ping command ends ### Actual Behavior Each time the above command is executed, there will be one more WindowsTerminal.exe process. I debugged the redundant WindowsTerminal.exe process and found that it was stuck on the line highlighted in the picture below. `D:\1\winterm\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\include\wil\filesystem.h` ![image](https://github.com/microsoft/terminal/assets/15074472/ffed717b-3d10-466c-83cd-ede1950cbdfd) I guessed it might be related to `Microsoft.Windows.ImplementationLibrary`, and then revert this PR https://github.com/microsoft/terminal/pull/16120 After recompiling and building, the problem disappeared and there were no redundant leaking processes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20977