PowerShell Core + RoboCopy: Ctrl-C does not interrupt execution #17798

Closed
opened 2026-01-31 05:53:43 +00:00 by claunia · 6 comments
Owner

Originally created by @doxxx on GitHub (Jun 24, 2022).

Windows Terminal version

1.13.11431.0

Windows build number

10.0.19044.1766

Other Software

PowerShell Core 7.2.5

Steps to reproduce

  1. Open PowerShell Core in Windows Terminal
  2. Run RoboCopy command to copy files from one directory to another
  3. Press Ctrl-C to interrupt

Expected Behavior

Robocopy execution is interrupted and control returns to the prompt.

Actual Behavior

When using PowerShell Core inside Windows Terminal, Ctrl-C does not interrupt Robocopy. Robocopy continues running and when it finishes, all the Ctrl-C presses are replayed at the prompt as they had been pressed after Robocopy had completed.

Ctrl-C to interrupt works in CMD running in Windows Terminal and in PowerShell Core using standard console window.

Originally created by @doxxx on GitHub (Jun 24, 2022). ### Windows Terminal version 1.13.11431.0 ### Windows build number 10.0.19044.1766 ### Other Software PowerShell Core 7.2.5 ### Steps to reproduce 1. Open PowerShell Core in Windows Terminal 2. Run RoboCopy command to copy files from one directory to another 3. Press Ctrl-C to interrupt ### Expected Behavior Robocopy execution is interrupted and control returns to the prompt. ### Actual Behavior When using PowerShell Core inside Windows Terminal, Ctrl-C does not interrupt Robocopy. Robocopy continues running and when it finishes, all the Ctrl-C presses are replayed at the prompt as they had been pressed after Robocopy had completed. Ctrl-C to interrupt works in CMD running in Windows Terminal and in PowerShell Core using standard console window.
claunia added the Needs-TriageIssue-BugNeeds-Tag-FixNeeds-Attention labels 2026-01-31 05:53:43 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 10, 2022):

How did you install PowerShell core/? I vaguely remember some issue about the global tools installer and control+c...

@zadjii-msft commented on GitHub (Aug 10, 2022): How did you install PowerShell core/? I vaguely remember some issue about the global tools installer and control+c...
Author
Owner

@doxxx commented on GitHub (Aug 11, 2022):

Either winget or the MSI installer. I'm 100% certain that I did not use dotnet tool install to install it, since this occurred while I was setting up a new laptop and PowerShell Core was one of the first things I installed even before the dotnet SDK.

@doxxx commented on GitHub (Aug 11, 2022): Either `winget` or the MSI installer. I'm 100% certain that I did not use `dotnet tool install` to install it, since this occurred while I was setting up a new laptop and PowerShell Core was one of the first things I installed even before the dotnet SDK.
Author
Owner

@zadjii-msft commented on GitHub (Aug 12, 2022):

Hmm, this isn't #6258 - That thread is more just a delay between pressing and receiving, and this is more robocopy DGAF and just doesn't read the console input at all. Hmm...

@zadjii-msft commented on GitHub (Aug 12, 2022): Hmm, this isn't #6258 - That thread is more just a delay between pressing and receiving, and this is more _robocopy DGAF_ and just doesn't read the console input at all. Hmm...
Author
Owner

@doxxx commented on GitHub (Aug 12, 2022):

It does work in CMD though...

@doxxx commented on GitHub (Aug 12, 2022): It does work in CMD though...
Author
Owner

@zadjii-msft commented on GitHub (Aug 12, 2022):

It does work in CMD though...

TO CLARIFY: Does this work in CMD tabs in the Terminal, or CMD in the vintage console (conhost.exe)?

@zadjii-msft commented on GitHub (Aug 12, 2022): > It does work in CMD though... TO CLARIFY: Does this work in CMD tabs in the Terminal, or CMD in the vintage console (conhost.exe)?
Author
Owner

@doxxx commented on GitHub (Aug 12, 2022):

I just retested this with Windows Terminal 1.14.1962.0 and PowerShell Core 7.2.5 and I can no longer reproduce the problem.

@doxxx commented on GitHub (Aug 12, 2022): I just retested this with Windows Terminal 1.14.1962.0 and PowerShell Core 7.2.5 and I can no longer reproduce the problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17798