Skip to content

Commit 5315dd2

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 cb5ccb0 commit 5315dd2

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
@@ -110,6 +110,9 @@ function patchProcessObject(expandArgv1) {
110110
configurable: getOptionValue('--build-snapshot'),
111111
value: process.argv[0]
112112
});
113+
114+
process.exitCode = undefined;
115+
process._exiting = false;
113116
process.argv[0] = process.execPath;
114117

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

0 commit comments

Comments
 (0)