2015-05-19 13:00:06 +02:00
|
|
|
'use strict';
|
2015-09-27 15:31:36 -07:00
|
|
|
require('../common');
|
2012-04-29 18:53:41 -07:00
|
|
|
var assert = require('assert');
|
|
|
|
|
|
|
|
// recursively calling .exit() should not overflow the call stack
|
|
|
|
var nexits = 0;
|
|
|
|
|
|
|
|
process.on('exit', function(code) {
|
|
|
|
assert.equal(nexits++, 0);
|
|
|
|
assert.equal(code, 1);
|
|
|
|
|
|
|
|
// now override the exit code of 1 with 0 so that the test passes
|
2013-09-06 18:23:02 -07:00
|
|
|
process.exit(0);
|
2012-04-29 18:53:41 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
process.exit(1);
|