Closed pnomolos closed 4 years ago
Hi, Could you describe a case where this would be useful?
In my case because I’m using Puma and want to send USR2 for restart and INT to stop (https://github.com/puma/puma/blob/master/docs/signals.md)
In this case, the signal
command would be more applicable. The restart
command expects a process to exit, but USR2
doesn't stop Puma, so it will break restart
behavior.
Hi @DarthSim, thanks, I guess that is what I’m looking for. A potential request, then, for the ability to add custom signal handlers - such as “overmind reload” - which you can customize the signals for (because Sidekiq takes a different signal than Puma does for a code reload). That being said, I could probably achieve that via clever use of shell aliases or functions rather than adding more code to Overmind :)
Ok, since we agree here, I'll close this PR. Feel free to open a new one with overmind signal
command, this would be a great feature.
I have never written Go before, so what I've done may not be very idiomatic (pretty much copied the stop-signal related code), but hopefully it's still useful.
I'm curious what the thought would be on having a general
overmind signal {process_name} [signal]
command might be (rather than having to track PIDs down)?