mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 11:29:26 +00:00

Only `test-stdin-from-file.js` has been modified so that the `stdin.txt` is written in a temp directory instead of the `fixtures` directory. PR-URL: https://github.com/nodejs/node/pull/6187 Reviewed-By: James M Snell <jasnell@gmail.com>
22 lines
400 B
JavaScript
22 lines
400 B
JavaScript
'use strict';
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
var net = require('net');
|
|
var closed = false;
|
|
|
|
common.refreshTmpDir();
|
|
|
|
var s = net.Server();
|
|
s.listen(common.PIPE);
|
|
s.unref();
|
|
|
|
setTimeout(function() {
|
|
closed = true;
|
|
s.close();
|
|
}, 1000).unref();
|
|
|
|
process.on('exit', function() {
|
|
assert.strictEqual(closed, false, 'Unrefd socket should not hold loop open');
|
|
});
|