forked from svrjs/svrjs
Server crashes now results in exit code of 1 if errno is not specified.
This commit is contained in:
parent
f58233a014
commit
09ef59832f
1 changed files with 3 additions and 3 deletions
6
svr.js
6
svr.js
|
@ -5859,7 +5859,7 @@ if (cluster.isPrimary || cluster.isPrimary === undefined) {
|
|||
serverconsole.locerrmessage("SVR.JS worker just crashed!!!");
|
||||
serverconsole.locerrmessage("Stack:");
|
||||
serverconsole.locerrmessage(err.stack ? generateErrorStack(err) : String(err));
|
||||
process.exit(err.errno);
|
||||
process.exit(err.errno !== undefined ? err.errno : 1);
|
||||
}
|
||||
|
||||
process.on("uncaughtException", crashHandlerMaster);
|
||||
|
@ -5923,7 +5923,7 @@ if (cluster.isPrimary || cluster.isPrimary === undefined) {
|
|||
serverconsole.locerrmessage("SVR.JS worker just crashed!!!");
|
||||
serverconsole.locerrmessage("Stack:");
|
||||
serverconsole.locerrmessage(err.stack ? generateErrorStack(err) : String(err));
|
||||
process.exit(err.errno);
|
||||
process.exit(err.errno !== undefined ? err.errno : 1);
|
||||
}
|
||||
|
||||
process.on("uncaughtException", crashHandler);
|
||||
|
@ -5947,6 +5947,6 @@ try {
|
|||
serverconsole.locerrmessage("Stack:");
|
||||
serverconsole.locerrmessage(generateErrorStack(err));
|
||||
setTimeout(function () {
|
||||
process.exit(err.errno ? err.errno : 1);
|
||||
process.exit(err.errno !== undefined ? err.errno : 1);
|
||||
}, 10);
|
||||
}
|
||||
|
|
Reference in a new issue