mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
310 B
14 lines
310 B
13 years ago
|
var common = require('../common');
|
||
13 years ago
|
var assert = require('assert');
|
||
|
|
||
13 years ago
|
// calling .exit() from within "exit" should not overflow the call stack
|
||
13 years ago
|
var nexits = 0;
|
||
|
|
||
13 years ago
|
process.on('exit', function(code) {
|
||
13 years ago
|
assert.equal(nexits++, 0);
|
||
13 years ago
|
assert.equal(code, 0);
|
||
13 years ago
|
process.exit();
|
||
|
});
|
||
|
|
||
13 years ago
|
// "exit" should be emitted unprovoked
|