Skip to content

cluster, net: fix listen pipe with readable and writable in cluster

fix listen pipe with readable and writable in cluster.

The bug can be triggered by code as follow.

const cluster = require('cluster');
const net = require('net');
const { unlinkSync } = require('fs');

if (cluster.isPrimary) {
    cluster.fork();
} else {
    try {
        unlinkSync('test.sock');
    } catch(e) {}
    net.createServer(() => {}).listen({
        path: 'test.sock',
        readableAll: true,
        writableAll: true,
    });
}

The permissions of test.sock is srwxr-xr-x instead of srwxrwxrwx .

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Affected subsystem: cluster, net

Merge request reports

Loading