diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2023-06-06 17:08:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-06 17:08:36 +0200 |
commit | 2f1614b1286f53b3b2ab96a15a525cb25462ba9a (patch) | |
tree | 846e5feef4ad5fe696242cd2bb4632961b1ae0b9 /docs/src | |
parent | b9b6db052b82dd0a429091238181195ec785ac0b (diff) | |
download | libuv-2f1614b1286f53b3b2ab96a15a525cb25462ba9a.tar.gz libuv-2f1614b1286f53b3b2ab96a15a525cb25462ba9a.zip |
unix,win: add UV_PIPE_NO_TRUNCATE flag (#4040)
Libuv's default behavior is to truncate long Unix socket paths. The flag
tells it to return an error instead.
Fixes: https://github.com/libuv/libuv/issues/4036
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/pipe.rst | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/docs/src/pipe.rst b/docs/src/pipe.rst index 9d95b206..4abdc65e 100644 --- a/docs/src/pipe.rst +++ b/docs/src/pipe.rst @@ -68,15 +68,18 @@ API Bind the pipe to a file path (Unix) or a name (Windows). - ``flags`` must be zero. Returns ``UV_EINVAL`` for unsupported flags - without performing the bind operation. + ``flags`` must be zero or ``UV_PIPE_NO_TRUNCATE``. Returns ``UV_EINVAL`` + for unsupported flags without performing the bind operation. Supports Linux abstract namespace sockets. ``namelen`` must include the leading nul byte but not the trailing nul byte. + .. versionadded:: 1.46.0 + .. note:: Paths on Unix get truncated to ``sizeof(sockaddr_un.sun_path)`` bytes, - typically between 92 and 108 bytes. + typically between 92 and 108 bytes, unless the ``UV_PIPE_NO_TRUNCATE`` + flag is specified, in which case an ``UV_EINVAL`` error is returned. .. c:function:: void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle, const char* name, uv_connect_cb cb) @@ -95,15 +98,18 @@ API Connect to the Unix domain socket or the Windows named pipe. - ``flags`` must be zero. Returns ``UV_EINVAL`` for unsupported flags - without performing the connect operation. + ``flags`` must be zero or ``UV_PIPE_NO_TRUNCATE``. Returns ``UV_EINVAL`` + for unsupported flags without performing the connect operation. Supports Linux abstract namespace sockets. ``namelen`` must include the leading nul byte but not the trailing nul byte. + .. versionadded:: 1.46.0 + .. note:: Paths on Unix get truncated to ``sizeof(sockaddr_un.sun_path)`` bytes, - typically between 92 and 108 bytes. + typically between 92 and 108 bytes, unless the ``UV_PIPE_NO_TRUNCATE`` + flag is specified, in which case an ``UV_EINVAL`` error is returned. .. c:function:: int uv_pipe_getsockname(const uv_pipe_t* handle, char* buffer, size_t* size) |