In --no-daemon unlink of nonexisting pidfile

When running application using --no-deamon, when process is killed with signal SIGTERM, it exits with code 1, due to fact that pidfile does not exist
v1.18.x
Davis 7 years ago committed by Julian Lam
parent 252be54b32
commit 7f95bdfe6f

@ -187,7 +187,9 @@ Loader.stop = function () {
killWorkers(); killWorkers();
// Clean up the pidfile // Clean up the pidfile
fs.unlinkSync(pidFilePath); if (nconf.get('daemon') !== 'false' && nconf.get('daemon') !== false) {
fs.unlinkSync(pidFilePath);
}
}; };
function killWorkers() { function killWorkers() {

Loading…
Cancel
Save