CMD Exit fails after running diskraid #17294

Closed
opened 2026-01-31 05:38:06 +00:00 by claunia · 4 comments
Owner

Originally created by @JustinWebDev on GitHub (Apr 20, 2022).

Windows Terminal version

1.12.10733.0

Windows build number

10.0.22000.613

Other Software

No response

Steps to reproduce

run Terminal as admin
issue cmd "diskraid"
issue cmd "exit"

Expected Behavior

the terminal to exit and close

Actual Behavior

C:\Users\hammack>exit
[process exited with code 4 (0x00000004)]

-> and it does not close

image

Originally created by @JustinWebDev on GitHub (Apr 20, 2022). ### Windows Terminal version 1.12.10733.0 ### Windows build number 10.0.22000.613 ### Other Software _No response_ ### Steps to reproduce run Terminal as admin issue cmd "diskraid" issue cmd "exit" ### Expected Behavior the terminal to exit and close ### Actual Behavior C:\Users\hammack>exit [process exited with code 4 (0x00000004)] -> and it does not close ![image](https://user-images.githubusercontent.com/40804543/164247685-29c32481-32db-475d-a3b4-0c6027cf99b1.png)
Author
Owner

@zadjii-msft commented on GitHub (Apr 20, 2022):

Please read the FAQs.

@zadjii-msft commented on GitHub (Apr 20, 2022): [Please read the FAQs.](https://github.com/microsoft/terminal/wiki/Frequently-Asked-Questions-(FAQ)#why-am-i-seeing-process-exited-with-code-)
Author
Owner

@JustinWebDev commented on GitHub (Apr 20, 2022):

This was incorrectly close. Windows Termainal didn't crash. The cmd failed, but WT is operational. This doesn't make sense. I could have 100 successful cmds after the failed one and you still block exit. Hmm.

@JustinWebDev commented on GitHub (Apr 20, 2022): This was incorrectly close. Windows Termainal didn't crash. The cmd failed, but WT is operational. This doesn't make sense. I could have 100 successful cmds after the failed one and you still block exit. Hmm.
Author
Owner

@zadjii-msft commented on GitHub (Apr 20, 2022):

No where in the "Why am I seeing [process exited with code ...]?" section does it talk about crashing...

The diskraid command returned a non-zero exit code. When you typed exit into cmd.exe, cmd.exe returned that exit code as it's own exit code. Because you've got the closeOnExit setting set to the default value of "graceful", the Terminal will only close the pane when the client app returns with a exit code of 0. So what you're seeing here is the Terminal informing you that the client application you launched (cmd.exe) returned a non-zero value (the 4 that was returned by diskraid).

Does that make sense?

@zadjii-msft commented on GitHub (Apr 20, 2022): No where in the "Why am I seeing `[process exited with code ...]`?" section does it talk about crashing... The diskraid command returned a non-zero exit code. When you typed `exit` into `cmd.exe`, `cmd.exe` returned that exit code as it's own exit code. Because you've got the `closeOnExit` setting set to the default value of `"graceful"`, the Terminal will only close the pane when the client app returns with a exit code of 0. So what you're seeing here is the Terminal informing you that the client application you launched (`cmd.exe`) returned a non-zero value (the `4` that was returned by `diskraid`). Does that make sense?
Author
Owner

@zadjii-msft commented on GitHub (Apr 21, 2022):

Sure okay - that's referring to the client commandline application crashing, not the terminal, and super not the point here 😉

@zadjii-msft commented on GitHub (Apr 21, 2022): Sure okay - that's referring to the client commandline application crashing, not the terminal, and super not the point here 😉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17294