Skip to content

Can we exit terminal completely when command exit is called? #11179

Closed

Description

@amithegde

Description of the new feature/enhancement

I usually enter command exit to exit cmd.exe or conemu which exits the process. But with terminal, it displays:

image

Now, need to grab mouse and click the close button to close it completely. Interestingly, when I have quake mode, there is no x button to close it so I need to take help from trusted friend Process Explorer to kill Terminal.

Note: this happens for the first tab, splits and other tabs seem to exit fine.

Proposed technical implementation details (optional)

  • When user enters the command exit terminal process should exit completely

Activity

  1. added
    Issue-Feature
    on Sep 8, 2021
  2. ghost added
    Needs-Triage
    on Sep 8, 2021
  3. ghost added
    Needs-Tag-Fix
    on Sep 8, 2021
  4. DHowett commented on Sep 8, 2021

    @DHowett
    Member

    (You can also close it with Ctrl+Shift+W.)

    Over to Mike Griese (@zadjii-msft) for his cached response 😄

  5. elsaco commented on Sep 9, 2021

    @elsaco

    By default "Profile termination behavior" in "Advanced" settings is "Close only when process exits successfully". By selecting first option "Close when process exits, fails, or crashes" will close a cmd.exe session without the [process exited with code 1] message.

    Sample config:
    wt_cmd_exit_setting

  6. LuanVSO commented on Sep 9, 2021

    @LuanVSO
    Contributor

    type this isntead:

    exit 0
  7. zadjii-msft commented on Sep 9, 2021

    @zadjii-msft
    Member

    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.

    #4263 (comment)

    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.

    #4736 (comment)

    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.

    And of course, as mentioned elsewhere in this thread, the closeOnExit setting can change this behavior if you're really used to using exit to close your terminal windows. You can read more about it in the docs here.

  8. ghost closed this as completedon Sep 9, 2021
  9. ghost removed
    Needs-Triage
    on Sep 9, 2021
  10. ghost added
    Resolution-Duplicate
    on Sep 9, 2021
  11. ghost removed
    Needs-Tag-Fix
    on Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureResolution-Duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions