-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Would it be worth supporting cleanup on non-normal process exit, such that:
/** Removes the PID file on normal process exit. */
Pid.prototype.removeOnExit = function() {
// do something when app is closing
process.on('exit', this.remove.bind(this));
// catches ctrl+c event
process.on('SIGINT', this.remove.bind(this));
// catches uncaught exceptions
process.on('uncaughtException', this.remove.bind(this));
};
When doing development I find that the process file remains when I hit ctrl-c.
Metadata
Metadata
Assignees
Labels
No labels