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

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

Originally created by @AndresLuga on GitHub (Jul 29, 2025).

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).

Originally created by @AndresLuga on GitHub (Jul 29, 2025). ### 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).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23483