[bug] CTRL+C will terminate shell process. #8484

Closed
opened 2026-01-31 01:30:41 +00:00 by claunia · 7 comments
Owner

Originally created by @Cologler on GitHub (May 22, 2020).

Environment

Windows build number: 10.0.18363.0
Windows Terminal version: 1.0.1401.0
aria2c: 1.35.0

Steps to reproduce

  1. Open new tab PowerShell.
  2. Execute command aria2c https://github.com/microsoft/terminal/releases/download/v1.0.1401.0/Microsoft.WindowsTerminalPreview_1.0.1402.0_8wekyb3d8bbwe.msixbundle
  3. Type CTRL+C before download finish.
  4. Show process exited and PowerShell terminated.

Expected behavior

CTRL+C only terminates aria2c instead of terminate the shell process.

Actual behavior

CTRL+C terminate both of aria2c and PowerShell.

image

Originally created by @Cologler on GitHub (May 22, 2020). # Environment ```none Windows build number: 10.0.18363.0 Windows Terminal version: 1.0.1401.0 aria2c: 1.35.0 ``` # Steps to reproduce 0. Open new tab PowerShell. 0. Execute command `aria2c https://github.com/microsoft/terminal/releases/download/v1.0.1401.0/Microsoft.WindowsTerminalPreview_1.0.1402.0_8wekyb3d8bbwe.msixbundle` 0. Type `CTRL+C` before download finish. 0. Show `process exited` and PowerShell terminated. # Expected behavior `CTRL+C` only terminates `aria2c` instead of terminate the shell process. # Actual behavior `CTRL+C` terminate both of `aria2c` and PowerShell. ![image](https://user-images.githubusercontent.com/10906962/82661059-e371d080-9c5d-11ea-9001-26f20d94658a.png)
claunia added the Needs-TriageNeeds-Tag-FixNeeds-AttentionProduct-Powershell labels 2026-01-31 01:30:41 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 22, 2020):

Which version of powershell are you using?

Does this repro in a legacy console (powershell) window, or only the Windows Terminal?

Does this repro if you call aria2c from a cmd.exe tab, instead of a Powershell tab?

@zadjii-msft commented on GitHub (May 22, 2020): Which version of powershell are you using? Does this repro in a legacy console (powershell) window, or only the Windows Terminal? Does this repro if you call `aria2c` from a `cmd.exe` tab, instead of a Powershell tab?
Author
Owner

@clintsinger commented on GitHub (May 22, 2020):

I have the same issue in practically anything that is currently running and then I kill it with ctrl-c while using PowerShell. I end up with a message like the following:

[process exited with code 3221225786]

The cmd.exe prompt doesn't have the same issue and just goes back to the prompt.

PowerShell Version: 6.2.3
Terminal Version: 1.0.1401.0

I have run into the issue with ssh, kubectl, etc. It doesn't matter what it is, as long as it it is running.

@clintsinger commented on GitHub (May 22, 2020): I have the same issue in practically anything that is currently running and then I kill it with `ctrl-c` while using PowerShell. I end up with a message like the following: > [process exited with code 3221225786] The `cmd.exe` prompt doesn't have the same issue and just goes back to the prompt. PowerShell Version: 6.2.3 Terminal Version: 1.0.1401.0 I have run into the issue with ssh, kubectl, etc. It doesn't matter what it is, as long as it it is running.
Author
Owner

@clintsinger commented on GitHub (May 22, 2020):

I updated to PowerShell version 7.0.1 and the issue has gone away.

@clintsinger commented on GitHub (May 22, 2020): I updated to PowerShell version 7.0.1 and the issue has gone away.
Author
Owner

@zadjii-msft commented on GitHub (May 22, 2020):

Huh. That's certainly odd. IIRC there was something about "powershell global tools" and ctrl+c that lead to ctrl+c killing other processes, but I'm fuzzy. @DHowett might remember better.

Since you were able to fix this issue, I'm going to close it out. Thanks!

@zadjii-msft commented on GitHub (May 22, 2020): Huh. That's certainly odd. IIRC there was something about "powershell global tools" and ctrl+c that lead to ctrl+c killing other processes, but I'm fuzzy. @DHowett might remember better. Since you were able to fix this issue, I'm going to close it out. Thanks!
Author
Owner

@Cologler commented on GitHub (May 22, 2020):

I can confirm the bug still here and it is about Microsoft terminal.

Both shell are PowerShell 7.0.1 but handle CTRL+C in different ways:

image

Please reopen this issue.

@Cologler commented on GitHub (May 22, 2020): I can confirm the bug still here and it is about Microsoft terminal. Both shell are PowerShell 7.0.1 but handle `CTRL+C` in different ways: ![image](https://user-images.githubusercontent.com/10906962/82707230-3f644580-9cae-11ea-93b1-fcd4bd012be3.png) Please reopen this issue.
Author
Owner

@zadjii-msft commented on GitHub (May 22, 2020):

@Cologler How did you install powershell 7?

The error code is the same as #4899, so I'm betting they're related.

@zadjii-msft commented on GitHub (May 22, 2020): @Cologler How did you install powershell 7? The error code is the same as #4899, so I'm betting they're related.
Author
Owner

@Cologler commented on GitHub (May 22, 2020):

I found https://github.com/microsoft/terminal/issues/4353 and https://github.com/PowerShell/PowerShell/issues/11314, seem like this bug is about scoop and PowerShell.

@Cologler commented on GitHub (May 22, 2020): I found https://github.com/microsoft/terminal/issues/4353 and https://github.com/PowerShell/PowerShell/issues/11314, seem like this bug is about scoop and PowerShell.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8484