Skip to content

Commit 7319419

Browse files
committed
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 01f6b95 commit 7319419

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

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

0 commit comments

Comments
 (0)