-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
Ctrl+C doesn't kill the process #302
Comments
From #292:
That was my impression too. Currently the Here's how I would approach it:
@natemcmaster if you agree I can submit a PR, unless you prefer to do it yourself |
Yes, this seems like the right approach. A PR would be greatly appreciated! |
I'm running into the same issue, when will the PR be merged? |
@thomaslevesque - I reviewed your PR and it matches what you proposed above, but I don't think I'm going to merge it yet. I've been thinking about this all week and think that Ctrl+C needs to be revisited altogether. I'm concerned users won't understand that the ctrl+c behavior changes based on which overload of OnExecute they invoke. I'm preparing a 2.4.4 patch which simply removes the blocking on async completions behavior. 5f724a7 If blocking on async completions is something you still want, let's open a new issue and look into adding an opt-in API for this behavior. For anyone who had come to depend on the behavior of waiting for async completions to finalize before process exit, they can restore the original behavior in 2.4.4 by adding code like this before CommandLineApplication runs. Console.CancelKeyPress += (o, e) =>
{
e.Cancel = true;
};
|
Sound like a reasonable approach 👍 |
Follow-up to #292
Regression in 3a86cab
Repro:
Result:
The text was updated successfully, but these errors were encountered: