github.com/Xiami2012/pidfile-go (go): Package pidfile provides a way to manage your PID file.  PID file is a file (usually with .pid file extension) with your running program's PID as its content. It is used for both avoiding running multiple same instances and managing the current running instance/service (sending signals).  The most simple usage is to call Write on startup and Remove on shutdown.  Use GetRunningPIDValid to read a PID file and verifies it is valid (process is running and has the same executable name with current process)  To avoid writing pidfile's path every time, use PIDFile struct.
Keywords: go|golang|pidfile