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 <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
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

Lines changed: 3 additions & 0 deletions
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)