blob: df356e50d37b66c334e4baf767500bad53764efb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
'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);
}));
|