invoker
invoker copied to clipboard
option to send SIGKILL?
I have a process that doesn't always respond to the SIGTERM signal and remains running; however invoker shuts down and loses track of this PID leaving an orphaned process around; I've used foreman/forego in the past and it tries to send a SIGTERM, waits a while and then issues SIGKILL on any remaining processes before stopping which cleans up everything correctly. Is it possible to do the same with invoker?
We can add a stop_strategy
option (inspired by a similar option in https://github.com/kostya/eye)
[someprocess]
command = someprocess
# Send a TERM signal. Wait for 20 seconds.
# If the process is still alive, send a KILL signal.
stop_strategy = "TERM, 20, KILL"
@iffyuva Any ideas?
Something like that would be great for my use case!
I think this should be added to the CLI, i.e. invoker signal sidekiq USR1
It already is implemented and has been there since very beginning:
invoker remove sidekiq -s 9
Which will remove sidekiq with signal 9. However when you will Invoker and it quits, all processes are attempted to be killed via TERM signal.
@gnufied I was thinking, instead of just 9, invoker should act as a shim for process commands, e.g it would be useful to send SIGTTIN
to a process, and not remove it.