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

Figure out handling of unexpected SIGTERM #249

Open
maruel opened this issue Feb 15, 2016 · 3 comments
Open

Figure out handling of unexpected SIGTERM #249

maruel opened this issue Feb 15, 2016 · 3 comments

Comments

@maruel
Copy link
Member

maruel commented Feb 15, 2016

We have cases where something sends an undesired SIGTERM to bot_main. It could be the task being run, OOM killer, whatever. It doesn't matter why, the fact it happens is the problem here. In any case, we'd like to differentiate between:

  • User on machine desiring to terminate the bot who sends a SIGTERM to the bot.
  • Undesired SIGTERM.

Alternatives are:

  • Replace SIGTERM with SIGUSR1 and disable SIGTERM handling.

The main problem with the smart SIGUSR1 idea is that it needs an alternative on Windows; which https://msdn.microsoft.com/ms683242.aspx can help but it's more pain work to implement.

@shishkander
Copy link
Member

Replace SIGTERM with SIGUSR1

do you mean update docs to send SIGUSR1 if a user wants to kill the bot?

@maruel
Copy link
Member Author

maruel commented Feb 17, 2016

Both updating the doc and the code.

@techtonik
Copy link

Why rely on intricacies of system signals? Is it possible to provide an OS independent channel for communication?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants
@maruel @techtonik @shishkander and others