invoker icon indicating copy to clipboard operation
invoker copied to clipboard

option to send SIGKILL?

Open frankstratton opened this issue 9 years ago • 5 comments

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?

frankstratton avatar May 21 '15 20:05 frankstratton

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?

nisanthchunduru avatar Jun 18 '15 21:06 nisanthchunduru

Something like that would be great for my use case!

frankstratton avatar Jul 13 '15 20:07 frankstratton

I think this should be added to the CLI, i.e. invoker signal sidekiq USR1

swanandp avatar Nov 09 '15 11:11 swanandp

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 avatar Jan 20 '16 22:01 gnufied

@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.

swanandp avatar Aug 08 '16 16:08 swanandp