Skip to content

Commit 94e8da8

Browse files
joyeecheungjuanarbol
authored andcommitted
bootstrap: reset process._exit and process.exitCode in pre-execution
PR-URL: #42466 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
1 parent cbdc0ab commit 94e8da8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/internal/bootstrap/pre_execution.js

+3
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ function patchProcessObject(expandArgv1) {
108108
configurable: getOptionValue('--build-snapshot'),
109109
value: process.argv[0]
110110
});
111+
112+
process.exitCode = undefined;
113+
process._exiting = false;
111114
process.argv[0] = process.execPath;
112115

113116
if (expandArgv1 && process.argv[1] &&

0 commit comments

Comments
 (0)