mkpidfile
Copyright (c) 2017 Michael Welter michael@yammm.com
About
Helper module for creating, locking, writing and closing proper pidfiles. I use for monit based monitoring of my Node servers.
The pidfile created will be unlinked when exiting if process.on("exit") is emitted.
Install
$ npm install --save mkpidfile
Usage
// Setup signal handlers so process exit event can be triggered "SIGINT" "SIGTERM" ; "/var/run/example.pid";
Debugging
NODE_DEBUG=mkpidfile