forked from svrjs/svrjs
Server crashes now results in exit code of 1 if errno is not specified.
This commit is contained in:
parent
984c94cd00
commit
a241af753e
1 changed files with 2 additions and 2 deletions
|
@ -524,7 +524,7 @@ if (cluster.isPrimary || cluster.isPrimary === undefined) {
|
||||||
serverconsole.locerrmessage(
|
serverconsole.locerrmessage(
|
||||||
err.stack ? generateErrorStack(err) : String(err),
|
err.stack ? generateErrorStack(err) : String(err),
|
||||||
);
|
);
|
||||||
process.exit(err.errno);
|
process.exit(err.errno !== undefined ? err.errno : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
process.on("uncaughtException", crashHandlerMaster);
|
process.on("uncaughtException", crashHandlerMaster);
|
||||||
|
@ -601,7 +601,7 @@ if (cluster.isPrimary || cluster.isPrimary === undefined) {
|
||||||
serverconsole.locerrmessage(
|
serverconsole.locerrmessage(
|
||||||
err.stack ? generateErrorStack(err) : String(err),
|
err.stack ? generateErrorStack(err) : String(err),
|
||||||
);
|
);
|
||||||
process.exit(err.errno);
|
process.exit(err.errno !== undefined ? err.errno : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
process.on("uncaughtException", crashHandler);
|
process.on("uncaughtException", crashHandler);
|
||||||
|
|
Reference in a new issue