mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 23:10:15 +00:00

convert var to const PR-URL: https://github.com/nodejs/node/pull/9953 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
16 lines
458 B
JavaScript
16 lines
458 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const cluster = require('cluster');
|
|
const net = require('net');
|
|
|
|
if (cluster.isMaster) {
|
|
// ensure that the worker exits peacefully
|
|
cluster.fork().on('exit', common.mustCall(function(statusCode) {
|
|
assert.strictEqual(statusCode, 0);
|
|
}));
|
|
} else {
|
|
// listen() without port should not trigger a libuv assert
|
|
net.createServer(common.fail).listen(process.exit);
|
|
}
|