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

Handle SIGINT #3

Open
tonyyzy opened this issue Oct 20, 2021 · 2 comments
Open

Handle SIGINT #3

tonyyzy opened this issue Oct 20, 2021 · 2 comments
Labels
good first issue Good for newcomers

Comments

@tonyyzy
Copy link
Contributor

tonyyzy commented Oct 20, 2021

Currently the users can't abort from a running lisbon routine with SIGINT. Use ctrlc to handle SIGINT.

@tonyyzy tonyyzy added the good first issue Good for newcomers label Dec 11, 2021
@nvu-arabesque
Copy link

out of curiousity, why cant user kill this process e.g. from pressing normal ctrl-c in cli ?

@tonyyzy tonyyzy changed the title Handle SIGTERM Handle SIGINT Dec 13, 2021
@tonyyzy
Copy link
Contributor Author

tonyyzy commented Dec 13, 2021

@nvu-arabesque sorry the description wasn't too accurate, ctrl-c sends an interrupt signal but the program is free to do what it wishes. Rust doesn't have a runtime so the signals are not handled automatically.

SIGINT is the signal sent when we press Ctrl+C. The default action is to terminate the process. However, some programs override this action and handle it differently.

Source: https://www.baeldung.com/linux/sigint-and-other-termination-signals

Ref: https://rust-cli.github.io/book/in-depth/signals.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants