Skip to content

Infinite loop in Command Prompt makes the whole Terminal window unresponsive #19188

@AndresLuga

Description

@AndresLuga

Windows Terminal version

1.23.11752.0

Windows build number

10.0.19045.6093

Other Software

No response

Steps to reproduce

  1. Execute the following in Command Prompt:
    FOR /L %N IN () DO @echo %time%

  2. Click "X" in the upper right to close the window.

  3. Press Ctrl-C.


Alternative:
0.1. Execute the following in Powershell:
while($true) {Get-Date}

0.2. Open Command Prompt in new Terminal tab.

  1. Execute the following in Command Prompt:
    FOR /L %N IN () DO @echo %time%

  2. Click "X" in the upper right to close the window.

  3. Press Ctrl-C.

Expected Behavior

Step 2: clicking "X" closes the window.
Step 3: Pressing Ctrl-C cancels the loop.

Actual Behavior

Step 2: clicking "X" makes the window unresponsive.
Step 3: Pressing Ctrl-C doesn't register (has no effect).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalCulprit-WinUIIt's not WinUI There's no way it's WinUI It was WinUIIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-2A description (P2)Product-TerminalThe new Windows Terminal.

    Type

    Projects

    Status

    To Cherry Pick

    Status

    Shipped

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions