Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console.Unix: fix, make CancelKeyPress work when input is redirected. #52891

Merged
2 commits merged into from
May 28, 2021

Conversation

tmds
Copy link
Member

@tmds tmds commented May 18, 2021

Fixes #51221.

Regressed in 5.0: #34297.

@jeffhandley @adamsitnik @carlossanlop @jozkee ptal

@ghost
Copy link

ghost commented May 18, 2021

Tagging subscribers to this area: @carlossanlop
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #51221.

Regressed in 5.0: #34297.

@jeffhandley @adamsitnik @carlossanlop @jozkee ptal

Author: tmds
Assignees: -
Labels:

area-System.Console

Milestone: -

@tmds tmds changed the title Console.Unix: fix, make SIGINT work when input is redirected. Console.Unix: fix, make CancelKeyPress work when input is redirected. May 18, 2021
@tmds
Copy link
Member Author

tmds commented May 18, 2021

CI is not too happy about this change:

Process terminated. Assertion failed.
   at System.Console.get_Out() in /_/src/libraries/System.Console/src/System/Console.cs:line 195
   at System.ConsolePal.EnsureInitializedCore() in /_/src/libraries/System.Console/src/System/ConsolePal.Unix.cs:line 922
   at System.ConsolePal.EnsureConsoleInitialized() in /_/src/libraries/System.Console/src/System/ConsolePal.Unix.cs:line 915
   at System.ConsolePal.ControlCHandlerRegistrar.Register() in /_/src/libraries/System.Console/src/System/ConsolePal.Unix.cs:line 1451
   at System.Console.add_CancelKeyPress(ConsoleCancelEventHandler value) in /_/src/libraries/System.Console/src/System/Console.cs:line 572
   at Xunit.ConsoleClient.ConsoleRunner.EntryPoint(String[] args) in /_/src/Microsoft.DotNet.XUnitConsoleRunner/src/ConsoleRunner.cs:line 47
   at Xunit.ConsoleClient.Program.Main(String[] args) in /_/src/Microsoft.DotNet.XUnitConsoleRunner/src/Program.cs:line 16

@tmds
Copy link
Member Author

tmds commented May 19, 2021

CI failures are now unrelated. This is ready for review.

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing it.

@ghost
Copy link

ghost commented May 28, 2021

Hello @stephentoub!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@stephentoub stephentoub reopened this May 28, 2021
@ghost ghost merged commit ff5b9e0 into dotnet:main May 28, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2021
@adamsitnik adamsitnik added this to the 6.0.0 milestone Aug 13, 2021
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET 5 apps can no longer intercept SIGINT signals (receive CancelKeyPress events) when running under Docker
3 participants