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

Allow custom script to handle bouncer stop #103

Open
blotus opened this issue Jul 25, 2024 · 0 comments
Open

Allow custom script to handle bouncer stop #103

blotus opened this issue Jul 25, 2024 · 0 comments

Comments

@blotus
Copy link
Member

blotus commented Jul 25, 2024

When the bouncer stops, the custom script does not know about it, preventing it from being able to clean up any resources it might have created.

We should:

  • Add a shutdown message when invoking the script for each decision to allow it to clean anything up if it needs to
  • Send SIGTERM instead of the default SIGKILL when feeding via stdin to allow the script to catch it and clean up.

In both cases, we also need a termination_timeout parameter to handle custom scripts that would take too long to clean up. After that, we would SIGKILL the custom script (to avoid the bouncer getting stuck on stop).

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