SO-Close-Vote-Reviewers / socvr-slack-statbot

Searches through the transcript for a given day and reports back the slack room.
0 stars 0 forks source link

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

Open gunr2171 opened 8 years ago

gunr2171 commented 8 years ago

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.