mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
process: Fix regression from a5dba82
Respect numeric string args to process.exit(code)
This commit is contained in:
@@ -547,7 +547,7 @@
|
||||
startup.processKillAndExit = function() {
|
||||
process.exitCode = 0;
|
||||
process.exit = function(code) {
|
||||
if (NativeModule.require('util').isNumber(code))
|
||||
if (code || code === 0)
|
||||
process.exitCode = code;
|
||||
|
||||
if (!process._exiting) {
|
||||
|
||||
@@ -29,7 +29,7 @@ process.on('exit', function(code) {
|
||||
assert.equal(code, 1);
|
||||
|
||||
// now override the exit code of 1 with 0 so that the test passes
|
||||
process.exit();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user