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

terminating a subprocess kills tusk without running Finally block #62

Open
cuotos opened this issue Dec 31, 2019 · 2 comments
Open

terminating a subprocess kills tusk without running Finally block #62

cuotos opened this issue Dec 31, 2019 · 2 comments

Comments

@cuotos
Copy link

cuotos commented Dec 31, 2019

I've got a task that runs a go binary until killed by the user, that binary is listen to SIGINT and SIGTERM in order to perform from cleanup operations.

So I understand correctly, if I start the app with Tusk, and kill it with ctrl+c, I kill Tusk, and "interrupt" is sent to my binary which does its cleanup. But Tusk gets killed and will not run its Finally code.

Is there any way I can pass the ctrl+c to the running process and not kill tusk instantly?

@rliebz
Copy link
Owner

rliebz commented Dec 31, 2019

I don't believe this is currently possible.

That said, allowing finally clauses to run after a SIGINT is probably better in general. I think it makes the most sense to make that the default behavior, and maybe a second SIGINT kills tusk.

@cuotos
Copy link
Author

cuotos commented Dec 31, 2019

That would be nice. If the initial SIGINT kills the sub process. In my case the "finally" would then run and do the cleanup. For now I'll move the "finally" logic into my app.

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

No branches or pull requests

2 participants