Bring back Console.CancelKeyPress
We need this so that we can wait on Ctrl + C events in console applications. See https://github.com/aspnet/Hosting/blob/dev/src/Microsoft.AspNet.Hosting/Program.cs#L69.
Yeah, this is strange omission.
This depends on SetConsoleCtrlHandler which looks like it is available on the Windows platforms we are targeting. However @stephentoub do you know if we can implement this x-plat?
We may be able to use signal(SIGINT, ...) for this on POSIX compliant platforms. More details are available at http://pubs.opengroup.org/onlinepubs/9699919799/functions/signal.html
That's what mono uses in their implementation.
Yeah, it should be doable.
We've reviewed this proposal and think it's a good addition. However, we haven't marked it as accepting PRs because we want to port the existing code from the .NET Framework. We'll resolve this issue when we ported the code.
Whats the state of this?
Going to take care of this in the next few days.
@ellismg - is this available now?
Sorry, been busy with other stuff. Will try to get to this soon.