process: Fix regression from a5dba82

Respect numeric string args to process.exit(code)
This commit is contained in:
isaacs committed 2013-09-06 18:23:15 -07:00
1 parent 6808706c3b
commit 39aafcf801
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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);