Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Have the program stop on a Sigterm command from linux #2

Open
gunr2171 opened this issue Nov 22, 2015 · 0 comments
Open

Have the program stop on a Sigterm command from linux #2

gunr2171 opened this issue Nov 22, 2015 · 0 comments

Comments

@gunr2171
Copy link
Member

When docker wants to stop a container its sends a SIGTERM command to the root process in the container. If the container does not exit within 10 seconds it will send a SIGKILL to the container's kernel.

Right now the program can catch Control+c, or SIGINT. This is the "polite" way to stop a program, but won't cut it for docker. I'd like to have the bot exit cleanly.

So far the closest I've gotten is this SO post and this source code file, but I can't get it to compile nor can I effectively debug it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant