mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
38ed3fb14f
PR-URL: https://github.com/nodejs/node/pull/9964 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
16 lines
438 B
JavaScript
16 lines
438 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const child = spawn(process.execPath, ['-e', `
|
|
const server = require('net').createServer().listen(0);
|
|
server.once('listening', server.close);
|
|
`]);
|
|
|
|
child.once('exit', common.mustCall(function(exitCode, signalCode) {
|
|
assert.strictEqual(exitCode, 0);
|
|
assert.strictEqual(signalCode, null);
|
|
}));
|