Skip to content

Update PipeWrap to use uv_pipe_bind2 and uv_pipe_connect2 to restore ability to connect to abstract domain sockets

Rodrigo Muino Tomonari requested to merge github/fork/ggoodman/fix-49656 into main

This PR moves PipeWrap from the classic uv_pipe_bind and uv_pipe_connect methods to their newer uv_pipe_bind2 and uv_pipe_connect2 counterparts. This restores support for connecting to abstract unix domain sockets. Support was lost due to the refactor in libuv/libuv#4030 where uv_pipe_bind and uv_pipe_connect now infer the length of the pathname using strlen(). For an abstract unix socket, this was producing 0. Moving to uv_pipe_bind2 and uv_pipe_connect2 allows us to pass an explicit size_t for the socket path based on the length of the v8 string.

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

Merge request reports

Loading