lestrrat-go / server-starter

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

Fix worker exiting detection #17

Closed kazeburo closed 5 years ago

kazeburo commented 5 years ago

Currently start-server kills old worker even if you failed to start a new worker.

In the Unix system, it was necessary to check the state of the process using wait4 instead of FindProcess.

https://golang.org/pkg/os/#FindProcess

On Unix systems, FindProcess always succeeds and returns a Process for the given pid, regardless of whether the process exists.

lestrrat commented 5 years ago

ありがとうございます!