"cmd.exe" does not exit the terminal properly if the last command didn't exit with 0 #18258

Open
opened 2026-01-31 06:08:23 +00:00 by claunia · 0 comments
Owner

Originally created by @dovholuknf on GitHub (Aug 22, 2022).

Windows Terminal version

1.14.1963.0

Windows build number

No response

Other Software

cme.exe - whatever comes with windows 11 latest

Steps to reproduce

  • set windows terminal preview as the default terminal application and save that setting
  • hit the start key
  • type: cmd.exe [enter] (to open "Command Prompt - App")
  • type: type bob
  • i expect you'll see: "The system cannot find the file specified."
  • type: exit

Expected Behavior

the terminal should exit

Actual Behavior

the terminal stays alive indicating:

C:\Users\user_name>exit

[process exited with code 1 (0x00000001)]
Originally created by @dovholuknf on GitHub (Aug 22, 2022). ### Windows Terminal version 1.14.1963.0 ### Windows build number _No response_ ### Other Software cme.exe - whatever comes with windows 11 latest ### Steps to reproduce * set windows terminal preview as the default terminal application and save that setting * hit the start key * type: cmd.exe [enter] (to open "Command Prompt - App") * type: type bob * i expect you'll see: "The system cannot find the file specified." * type: exit ### Expected Behavior the terminal should exit ### Actual Behavior the terminal stays alive indicating: ``` C:\Users\user_name>exit [process exited with code 1 (0x00000001)] ```
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 06:08:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18258