diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 59df3d1ceb328d..4b912accaff6eb 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -110,6 +110,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] &&