Conversation
|
Curious, can you tell me the use case for this? Additionally, would you mind adding tests and also support for the other platforms? Others may be able to help with this, so you aren't alone :) |
|
No problem! One example could be to control docker containers from systemd, one don't simply kill the "docker run" process, you need to pass in "docker stop " in order to cleanly stop the process. That's what I would like to do. Don't know about the other process-controllers.. so hopefully others can help me out here. I'll look into getting the test-suite to run. |
|
@lsjostro It may seem silly, but we could file a ticket with Docker to discuss SIGINT and SIGTERM terminating a 'docker run' the same way 'docker stop' would. Regardless, I am in favor of this features anyway. A custom 'stop' procedure seems reasonable, even if not all platforms can support it (daemontools, runit, etc cannot do this) |
|
To add support for other platforms, we could have a wrapper tool that executes the custom 'stop' functionality on INT/TERM signals. This would make it work with any platform (daemontools, etc) |
|
That plan for supporting other platforms is ... incredibly simple and functional. It would save me a LOT in future headaches. |
A command to execute to stop the service. A failure of this command will cause the stop to abort. Useful when killing process is not enough.