• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../common');
4const assert = require('assert');
5const spawn = require('child_process').spawn;
6
7const child = spawn(process.execPath, ['-e', `
8    const server = require('net').createServer().listen(0);
9    server.once('listening', server.close);
10`]);
11
12child.once('exit', common.mustCall(function(exitCode, signalCode) {
13  assert.strictEqual(exitCode, 0);
14  assert.strictEqual(signalCode, null);
15}));
16