Skip to content

cluster: correctly handle relative unix socket paths

Relative unix sockets paths were previously interpreted relative to the master's CWD, which was inconsistent with non-cluster behavior. A test case has been added as well.

I only added the "find the shortest possible path for unix sockets" to the cluster code, so that outside of workers the net API would still map to the actual syscalls happening under the hood cleanly.

Fixes: https://github.com/nodejs/node/issues/16387

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

net, cluster

Merge request reports

Loading