Files
node/lib/internal/modules/esm/handle_process_exit.js
2023-11-23 10:51:02 +01:00

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,
};