mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
process: Fix regression from a5dba82
Respect numeric string args to process.exit(code)
This commit is contained in:
1 parent
6808706c3b
commit
39aafcf801
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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