mirror of
https://github.com/nodejs/node.git
synced 2025-05-01 08:42:45 +00:00

PR-URL: https://github.com/nodejs/node/pull/43634 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
30 lines
657 B
JavaScript
30 lines
657 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
if (common.isWindows) {
|
|
common.skip('skip on Windows');
|
|
return;
|
|
}
|
|
|
|
const assert = require('assert');
|
|
const cluster = require('cluster');
|
|
const net = require('net');
|
|
const fs = require('fs');
|
|
|
|
if (cluster.isPrimary) {
|
|
cluster.fork();
|
|
} else {
|
|
const tmpdir = require('../common/tmpdir');
|
|
tmpdir.refresh();
|
|
const server = net.createServer().listen({
|
|
path: common.PIPE,
|
|
readableAll: true,
|
|
writableAll: true,
|
|
}, common.mustCall(() => {
|
|
const stat = fs.statSync(common.PIPE);
|
|
assert.strictEqual(stat.mode & 0o777, 0o777);
|
|
server.close();
|
|
process.disconnect();
|
|
}));
|
|
}
|