bokwoon95/wgo

option to control signal (or number of signals)

Closed this issue · 1 comments

tmc commented

Since some programs have graceful shutdowns, it's possible that the previous program (with a bound port perhaps) isn't done stopping by the time wgo starts the next process.

Please consider supplying the ability to send multiple signals or control which signal is sent.

Please consider supplying the ability to send multiple signals or control which signal is sent.

What signals are you looking at? Currently wgo uses SIGTERM to kill the process, which applications can intercept and use it to initiate graceful shutdown. There's a sample program (testdata/signal/main.go) that shows this in action, and the tests signal off and signal on test that program.

it's possible that the previous program (with a bound port perhaps) isn't done stopping by the time wgo starts the next process

Oh, that should not be possible. wgo doesn't run the next command until the previous command is fully killed. Is there something you're observing that shows that it is happening?