mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
PR-URL: https://github.com/nodejs/node/pull/49523 Backport-PR-URL: https://github.com/nodejs/node/pull/50669 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
15 lines
330 B
JavaScript
15 lines
330 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Handle a Promise from running code that potentially does Top-Level Await.
|
|
* In that case, it makes sense to set the exit code to a specific non-zero value
|
|
* if the main code never finishes running.
|
|
*/
|
|
function handleProcessExit() {
|
|
process.exitCode ??= 13;
|
|
}
|
|
|
|
module.exports = {
|
|
handleProcessExit,
|
|
};
|