Prints "[process exited with code 9009]" instead of closing the Windows Terminal when I type "exit". #11292

Closed
opened 2026-01-31 02:43:36 +00:00 by claunia · 3 comments
Owner

Originally created by @Kerem00 on GitHub (Nov 5, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.19042.610]
Windows Terminal version (if applicable): 1.3.2651.0

Steps to reproduce

When you type something that is not recognized as a command and after that you type exit, it prints "[process exited with code 9009]" and doesn't close the Windows Terminal window.

SFdX1AAxKD

Expected behavior

If you type normal commands like cd or cls and after that you type exit, it closes the Windows Terminal window as expected.

LHoj3y7ucs

Actual behavior

exit command isn't closing the window.

Originally created by @Kerem00 on GitHub (Nov 5, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.19042.610] Windows Terminal version (if applicable): 1.3.2651.0 ``` # Steps to reproduce When you type something that is not recognized as a command and after that you type `exit`, it prints "[process exited with code 9009]" and doesn't close the Windows Terminal window. ![SFdX1AAxKD](https://user-images.githubusercontent.com/52210913/98262019-2b7b7a00-1f96-11eb-973c-5f6cd1b2b405.gif) # Expected behavior If you type normal commands like `cd` or `cls` and after that you type `exit`, it closes the Windows Terminal window as expected. ![LHoj3y7ucs](https://user-images.githubusercontent.com/52210913/98262834-1eab5600-1f97-11eb-9eda-7edf49ec38f5.gif) # Actual behavior `exit` command isn't closing the window.
claunia added the Resolution-Duplicate label 2026-01-31 02:43:36 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Nov 5, 2020):

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 (Nov 5, 2020): 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 (Nov 5, 2020):

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 (Nov 5, 2020): 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!
Author
Owner

@sinanca commented on GitHub (Feb 1, 2023):

not working

[process exited with code 1 (0x00000001)]

@sinanca commented on GitHub (Feb 1, 2023): not working [process exited with code 1 (0x00000001)]
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11292