DarthSim / overmind

Process manager for Procfile-based applications and tmux
MIT License
2.89k stars 82 forks source link

Propagate SIGINFO to all processes #150

Closed joeytepp closed 1 year ago

joeytepp commented 1 year ago

NOTE: This only works on MacOS since there is no SIGINFO signal on Linux. See https://github.com/golang/go/issues/1653

My team has been using overmind for a while now and 1 thing that's been missing for us has been the propagation of the SIGINFO signal. One of our processes traps SIGINFOs (through ctrl + t) when run in isolation, however when using overmind this no longer works. This change would propagate the SIGINFO signal to all overmind processes which would allow for each process to handle the signal itself.

You could test locally this by creating the following Procfile at the root of your folder

test: sleep 10000

and then running go build && ./overmind start. After this press ctrl + t to trigger info and verify that you get the output of the SIGINFO signal on the sleep process. It should look something like

load: 8.65  cmd: tmux 59513 waiting 0.00u 0.00s
test   | sleep: about 9998 second(s) left out of the original 10000
joeytepp commented 1 year ago

@DarthSim would greatly appreciate a review on this when you have the time 🙏

DarthSim commented 1 year ago

Hey @joeytepp! This looks nice, thanks for your contribution!