diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 3ef1bca0d4f..b64dfaf980f 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -111,6 +111,9 @@ function patchProcessObject(expandArgv1) { configurable: getOptionValue('--build-snapshot'), value: process.argv[0] }); + + process.exitCode = undefined; + process._exiting = false; process.argv[0] = process.execPath; if (expandArgv1 && process.argv[1] &&