mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
3e1b1dd4a9
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
21 lines
527 B
JavaScript
21 lines
527 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
var cluster = require('cluster');
|
|
var net = require('net');
|
|
|
|
if (cluster.isMaster) {
|
|
// ensure that the worker exits peacefully
|
|
var worker = cluster.fork();
|
|
worker.on('exit', function(statusCode) {
|
|
assert.equal(statusCode, 0);
|
|
worker = null;
|
|
});
|
|
process.on('exit', function() {
|
|
assert.equal(worker, null);
|
|
});
|
|
}
|
|
else {
|
|
// listen() without port should not trigger a libuv assert
|
|
net.createServer(assert.fail).listen(process.exit);
|
|
}
|