Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pwsh as a dotnet global tool exhibits very unusual behavior with Ctrl-C #11314

Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aWG-Enginecore PowerShell engine, interpreter, and runtime
Milestone
@DHowett-MSFT

Description

@DHowett-MSFT

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 prompt

Actual 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\duhowett

image

The 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aWG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp