CMD - Process exited with code 9009 #14997

Closed
opened 2026-01-31 04:25:32 +00:00 by claunia · 3 comments
Owner

Originally created by @ashwinexe on GitHub (Aug 28, 2021).

Windows Terminal version (or Windows build number)

10.0.19043.1165

Other Software

No response

Steps to reproduce

1- Write any not recognized command in cmd terminal
2- Type exit command

Expected Behavior

The cmd tab should close on executing exit command

Actual Behavior

Command Prompt throwing error and shortcut commands stop working to close it.
Only way to close the tab is clicking on x
image

Originally created by @ashwinexe on GitHub (Aug 28, 2021). ### Windows Terminal version (or Windows build number) 10.0.19043.1165 ### Other Software _No response_ ### Steps to reproduce 1- Write any `not recognized` command in cmd terminal 2- Type `exit` command ### Expected Behavior The cmd tab should close on executing `exit` command ### Actual Behavior Command Prompt throwing error and shortcut commands stop working to close it. Only way to close the tab is clicking on `x` ![image](https://user-images.githubusercontent.com/53075480/131207951-f55cca6c-7e55-4ad7-a51d-1dce9b8e7afd.png)
claunia added the Resolution-Duplicate label 2026-01-31 04:25:32 +00:00
Author
Owner

@polluks commented on GitHub (Aug 30, 2021):

Maybe this behavior is willful.
Workaround: exit 0

@polluks commented on GitHub (Aug 30, 2021): Maybe this behavior is willful. Workaround: `exit 0`
Author
Owner

@zadjii-msft commented on GitHub (Aug 30, 2021):

Thanks for the report! Please make sure to search for duplicates when filing new issues. There's already a decent amount of discussion in the above issues explaining why this happens.

https://github.com/microsoft/terminal/issues/4263#issuecomment-670164469

This behavior exists to stop an error message printed out by a program from disappearing instantly when it exits. There is a class of applications for which that is extremely important. We're following this behavior because it is the right brhavior to follow, and because you can turn it off with a config option very easily.

https://github.com/microsoft/terminal/issues/4736#issuecomment-592127830

Alas, this is a behavior that's highly conserved across multiple shells and terminal emulators on most mainstream operating systems; more info in #4223 (comment). If you'd rather it just exit every time, set closeOnExit to true. 😄 /dup #4223.

@zadjii-msft commented on GitHub (Aug 30, 2021): Thanks for the report! Please make sure to [search for duplicates](https://github.com/microsoft/terminal/issues?q=is%3Aissue+%22process+exited+with+code+9009%22+is%3Aclosed) when filing new issues. There's already a decent amount of discussion in the above issues explaining why this happens. https://github.com/microsoft/terminal/issues/4263#issuecomment-670164469 > This behavior exists to stop an error message printed out by a program from _disappearing instantly_ when it exits. There is a class of applications for which that is extremely important. We're following this behavior because it is the right brhavior to follow, _and because you can turn it off with a config option very easily._ https://github.com/microsoft/terminal/issues/4736#issuecomment-592127830 > Alas, this is a behavior that's highly conserved across multiple shells and terminal emulators on most mainstream operating systems; more info in [#4223 (comment)](https://github.com/microsoft/terminal/issues/4223#issuecomment-574834181). If you'd rather it just exit every time, set `closeOnExit` to true. 😄 /dup #4223.
Author
Owner

@ghost commented on GitHub (Aug 30, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Aug 30, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14997