lestrrat-go / server-starter

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

Avoid duplication boot when pid file exist #5

Closed katsutomu closed 7 years ago

katsutomu commented 7 years ago

Please following topics.

Missing pid file when duplicate call start_server

start_server --pid-file=start_server.pid -- hoge
start_server --pid-file=start_server.pid -- hoge
ls start_server.pid 
ls: start_server.pid: No such file or directory

My product call command as described below on hot deploy

/bin/cat start_server.pid | xargs kill -HUP

For that reason, it should exist pid file. The modified so that it does not start & not erase pid file.

Best regards.

lestrrat commented 7 years ago

@katsutomu That's not the correct way to check for duplicate pid files. I forgot to implement a strict check for this. a new PR is coming up....

lestrrat commented 7 years ago

Please try #6.

katsutomu commented 7 years ago

Thank you!! I'll try #6.

katsutomu commented 7 years ago

Close because it was modified on #6 Thank you!