8000 Implement and expose Console.TreatControlCAsInput by stephentoub · Pull Request #6669 · dotnet/corefx · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Implement and expose Console.TreatControlCAsInput #6669

Merged
merged 1 commit into from
Mar 7, 2016

Conversation

stephentoub
Copy link
Member

This provides Windows and Unix implementations of TreatControlCAsInput, and exposes it in the contract. The Windows implementation is ported from the full framework. The Unix implementation relies on setting the terminal's ISIG flag, which controls whether it generates signals. This mostly results in the same behaviors as on Windows. However, one notable difference is it doesn't just affect ctrl-C, but all of the ctrl-*s that result in signals, e.g. ctrl-, ctrl-Z, etc.

cc: @pallavit, @andschwa
Closes https://github.com/dotnet/corefx/issues/4636

This provides Windows and Unix implementations of TreatControlCAsInput, and exposes it in the contract.  The Windows implementation is ported from the full framework. The Unix implementation relies on setting the terminal's IGNBRK flag, which tells it to allow breaks to be treated as input rather than generating signals.  This mostly results in the same behaviors as on Windows.  However, one notable difference is it doesn't just affect ctrl-C, but all of the ctrl-*s that result in signals, e.g. ctrl-\, ctrl-Z, etc.
@stephentoub
Copy link
Member Author

Thanks, Pallavi.

stephentoub added a commit that referenced this pull request Mar 7, 2016
Implement and expose Console.TreatControlCAsInput
@stephentoub stephentoub merged commit 6d50e1e into dotnet:master Mar 7, 2016
@stephentoub stephentoub deleted the treat_ctrlc branch March 7, 2016 20:36
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Implement and expose Console.TreatControlCAsInput

Commit migrated from dotnet/corefx@6d50e1e
Sign up for free to subscribe to this conversation on GitHub. 5BDC Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0