Skip to content

Ctrl+D (EOF) input doesn't close a WSL terminal #4223

@armak

Description

@armak

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.356]
Windows Terminal version: v0.8.10091.0

I'm using the zsh shell.
The "closeOnExit" setting set to `true`, but the behavior is the same regardless.

Steps to reproduce

  1. Open Windows Terminal
  2. Run a command or execute a program that exits with a code other than 0
  3. Press Ctrl+D

Expected behavior

Terminal window (or tab) is closed as if the exit command was given.

Actual behavior

Terminal prints a new line and then [process exited with code 127] (the number being the previous command's exit code), and finally an input prompt on the same line, but no text input is accepted. Terminal session is halted and doesn't accept input (surrounding UI and new tabs do work).

I believe this behavior is new in the 0.8... version and didn't exist in the previous official preview release. Running the same WSL environment via cmd.exe also behaves as expected, immediately closing the command line after entering the EOF code.

Also in other exit code cases (such as giving Ctrl+D directly to a fresh terminal), Windows Terminal exits as expected.

Visual example:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-Tag-FixDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingResolution-By-DesignIt's supposed to be this way. Sometimes for compatibility reasons.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions