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

Provide support for CTRL+C / CTRL+BREAK #35

Closed
madelson opened this issue Apr 3, 2019 · 0 comments
Closed

Provide support for CTRL+C / CTRL+BREAK #35

madelson opened this issue Apr 3, 2019 · 0 comments
Milestone

Comments

@madelson
Copy link
Owner

madelson commented Apr 3, 2019

Purpose: Kestrel processes (and perhaps others) respond to SIGINT for clean shutdown. It would be nice if we could help by sending this signal.

Inspiration: https://stackoverflow.com/questions/813086/can-i-send-a-ctrl-c-sigint-to-an-application-on-windows

Another implementation: https://github.com/nullean/proc

Also related: https://github.com/dotnet/cli/pull/10720/files

Would need to check for windows since I don't know what the linux implementation is.

Another useful function for detecting whether we are part of that: https://docs.microsoft.com/en-us/windows/console/getconsoleprocesslist

Unix kill: https://github.com/dotnet/corefx/blob/81bd671efda5db20fae1eb381aeff2cf8ea727ac/src/Common/src/Interop/Unix/System.Native/Interop.Kill.cs + https://github.com/dotnet/corefx/blob/83753bc26b6debb966b94c0c26d4e718f312c8e1/src/Common/src/Interop/Unix/Interop.Libraries.cs, or alternatively https://developers.redhat.com/blog/2019/03/25/using-net-pinvoke-for-linux-system-functions/

@madelson madelson added this to the 1.6 milestone Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant