lestrrat-go / server-starter

Go port of start_server utility (Server::Starter)
MIT License
215 stars 21 forks source link

Fix: wrong choose signal. #14

Closed sioncojp closed 7 years ago

sioncojp commented 7 years ago

When you see it, you will know.

sioncojp commented 7 years ago

Please wait until I resolve that there is one thing that bothers me. sorry.

sioncojp commented 7 years ago

OK. Resolved. Please review!

lestrrat commented 7 years ago

No, this is not what SignalOnHUP is about. SignalOnHUP is "what start_server sends when it receives a HUP". The default behavior is to send a TERM signal when HUP is received.

sioncojp commented 7 years ago

I got it. Thank you!!! Close this PR.

sioncojp commented 7 years ago

Sorry, I've a question. Why did you choise default not signalOnHUP = syscall.SIGHUP but signalOnHUP = syscall.SIGTERM?

lestrrat commented 7 years ago

The entire design of the go version was based on Perl5's start_server command, so you probably should go ask the author of the original for the real "why".

I'm guessing that it's safer to make the default action "properly kill" the backend program, and force the user to explicitly specify what signal should be used for the backend program to be notified of a graceful restart.

sioncojp commented 7 years ago

Thanks for the follow up!