- Notifications
You must be signed in to change notification settings - Fork8.1k
Closed
Labels
Milestone
Description
Steps to reproduce
Install powershell as a dotnet global tool. Run a long-running thing (like Start-Sleep), and then pressCtrl+C
Expected behavior
I am returned to a powershell prompt.
C:\Users\duhowett>.\.dotnet\tools\pwshPowerShell 6.2.3(dhowett-dev2) ~ % start-sleep 10^C(dhowett-dev2) ~ % # i am returned to a powershell promptActual behavior
Thedotnet tool shim hosting powershell terminates and returns control tocmd, but powershell remains connected to the console and reads input simultaneously. PowerShell and CMD share the input buffer, and neither of them can agree on what goes into it.
If you manage to exit cmd, powershell re-asserts control.
Thedir in the snippet below came fromcmd
C:\Users\duhowett>.\.dotnet\tools\pwshPowerShell 6.2.3(dhowett-dev2) ~ % start-sleep 10^CC:\Users\duhowett>(dhowett-dev2) ~ % dir Volume in drive C is Cesium Volume Serial Number is E499-450A Directory of C:\Users\duhowettThe blued came from powershell, and their came from cmd.
Environment data
Name Value---- -----PSVersion 6.2.3PSEdition CoreGitCommitId 6.2.3OS Microsoft Windows 10.0.19041Platform Win32NTPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}PSRemotingProtocolVersion 2.3SerializationVersion 1.1.0.1WSManStackVersion 3.0