diff options
author | cjihrig <cjihrig@gmail.com> | 2019-03-16 14:38:18 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-03-18 14:42:24 -0400 |
commit | d6f6d7f8541327b72667d38777c47b9ea675125d (patch) | |
tree | babcc15f478453e5a7a426f1227c3372cb79e869 /deps/uv/docs | |
parent | 04f30e1a7a5a2f49b611314578758e2009ec2152 (diff) | |
download | android-node-v8-d6f6d7f8541327b72667d38777c47b9ea675125d.tar.gz android-node-v8-d6f6d7f8541327b72667d38777c47b9ea675125d.tar.bz2 android-node-v8-d6f6d7f8541327b72667d38777c47b9ea675125d.zip |
deps: upgrade to libuv 1.27.0
Notable changes:
- `statx()` is used to retrieve file birth times on
supported platforms.
- Improved support of running under Windows safe mode.
- Add support for UDP connected sockets. Several functions
can now return `UV_EBADF` instead of `UV_EINVAL`.
- SunOS support is improved.
PR-URL: https://github.com/nodejs/node/pull/26707
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/uv/docs')
-rw-r--r-- | deps/uv/docs/src/loop.rst | 2 | ||||
-rw-r--r-- | deps/uv/docs/src/signal.rst | 24 | ||||
-rw-r--r-- | deps/uv/docs/src/threading.rst | 4 | ||||
-rw-r--r-- | deps/uv/docs/src/udp.rst | 54 |
4 files changed, 76 insertions, 8 deletions
diff --git a/deps/uv/docs/src/loop.rst b/deps/uv/docs/src/loop.rst index 86a99adf5d..d642ac1d2f 100644 --- a/deps/uv/docs/src/loop.rst +++ b/deps/uv/docs/src/loop.rst @@ -107,6 +107,8 @@ API or requests left), or non-zero if more callbacks are expected (meaning you should run the event loop again sometime in the future). + :c:func:`uv_run` is not reentrant. It must not be called from a callback. + .. c:function:: int uv_loop_alive(const uv_loop_t* loop) Returns non-zero if there are referenced active handles, active diff --git a/deps/uv/docs/src/signal.rst b/deps/uv/docs/src/signal.rst index f52b64706a..f5a809ab0b 100644 --- a/deps/uv/docs/src/signal.rst +++ b/deps/uv/docs/src/signal.rst @@ -6,7 +6,10 @@ Signal handles implement Unix style signal handling on a per-event loop bases. -Reception of some signals is emulated on Windows: +Windows notes +------------- + +Reception of some signals is emulated: * SIGINT is normally delivered when the user presses CTRL+C. However, like on Unix, it is not generated when terminal raw mode is enabled. @@ -24,13 +27,22 @@ Reception of some signals is emulated on Windows: * Calls to raise() or abort() to programmatically raise a signal are not detected by libuv; these will not trigger a signal watcher. -.. note:: - On Linux SIGRT0 and SIGRT1 (signals 32 and 33) are used by the NPTL pthreads library to - manage threads. Installing watchers for those signals will lead to unpredictable behavior - and is strongly discouraged. Future versions of libuv may simply reject them. - .. versionchanged:: 1.15.0 SIGWINCH support on Windows was improved. +Unix notes +---------- + +* SIGKILL and SIGSTOP are impossible to catch. + +* Handling SIGBUS, SIGFPE, SIGILL or SIGSEGV via libuv results into undefined behavior. + +* SIGABRT will not be caught by libuv if generated by `abort()`, e.g. through `assert()`. + +* On Linux SIGRT0 and SIGRT1 (signals 32 and 33) are used by the NPTL pthreads library to + manage threads. Installing watchers for those signals will lead to unpredictable behavior + and is strongly discouraged. Future versions of libuv may simply reject them. + + Data types ---------- diff --git a/deps/uv/docs/src/threading.rst b/deps/uv/docs/src/threading.rst index a5759a38a6..7ca1d4b7a5 100644 --- a/deps/uv/docs/src/threading.rst +++ b/deps/uv/docs/src/threading.rst @@ -61,13 +61,13 @@ Threads :: - typedef struct uv_process_options_s { + typedef struct uv_thread_options_s { enum { UV_THREAD_NO_FLAGS = 0x00, UV_THREAD_HAS_STACK_SIZE = 0x01 } flags; size_t stack_size; - } uv_process_options_t; + } uv_thread_options_t; More fields may be added to this struct at any time, so its exact layout and size should not be relied upon. diff --git a/deps/uv/docs/src/udp.rst b/deps/uv/docs/src/udp.rst index 8148828522..f3de53fbab 100644 --- a/deps/uv/docs/src/udp.rst +++ b/deps/uv/docs/src/udp.rst @@ -150,6 +150,44 @@ API :returns: 0 on success, or an error code < 0 on failure. +.. c:function:: int uv_udp_connect(uv_udp_t* handle, const struct sockaddr* addr) + + Associate the UDP handle to a remote address and port, so every + message sent by this handle is automatically sent to that destination. + Calling this function with a `NULL` `addr` disconnects the handle. + Trying to call `uv_udp_connect()` on an already connected handle will result + in an `UV_EISCONN` error. Trying to disconnect a handle that is not + connected will return an `UV_ENOTCONN` error. + + :param handle: UDP handle. Should have been initialized with + :c:func:`uv_udp_init`. + + :param addr: `struct sockaddr_in` or `struct sockaddr_in6` + with the address and port to associate to. + + :returns: 0 on success, or an error code < 0 on failure. + + .. versionadded:: 1.27.0 + +.. c:function:: int uv_udp_getpeername(const uv_udp_t* handle, struct sockaddr* name, int* namelen) + + Get the remote IP and port of the UDP handle on connected UDP handles. + On unconnected handles, it returns `UV_ENOTCONN`. + + :param handle: UDP handle. Should have been initialized with + :c:func:`uv_udp_init` and bound. + + :param name: Pointer to the structure to be filled with the address data. + In order to support IPv4 and IPv6 `struct sockaddr_storage` should be + used. + + :param namelen: On input it indicates the data of the `name` field. On + output it indicates how much of it was filled. + + :returns: 0 on success, or an error code < 0 on failure + + .. versionadded:: 1.27.0 + .. c:function:: int uv_udp_getsockname(const uv_udp_t* handle, struct sockaddr* name, int* namelen) Get the local IP and port of the UDP handle. @@ -247,6 +285,12 @@ API (``0.0.0.0`` or ``::``) it will be changed to point to ``localhost``. This is done to match the behavior of Linux systems. + For connected UDP handles, `addr` must be set to `NULL`, otherwise it will + return `UV_EISCONN` error. + + For connectionless UDP handles, `addr` cannot be `NULL`, otherwise it will + return `UV_EDESTADDRREQ` error. + :param req: UDP request handle. Need not be initialized. :param handle: UDP handle. Should have been initialized with @@ -266,15 +310,25 @@ API .. versionchanged:: 1.19.0 added ``0.0.0.0`` and ``::`` to ``localhost`` mapping + .. versionchanged:: 1.27.0 added support for connected sockets + .. c:function:: int uv_udp_try_send(uv_udp_t* handle, const uv_buf_t bufs[], unsigned int nbufs, const struct sockaddr* addr) Same as :c:func:`uv_udp_send`, but won't queue a send request if it can't be completed immediately. + For connected UDP handles, `addr` must be set to `NULL`, otherwise it will + return `UV_EISCONN` error. + + For connectionless UDP handles, `addr` cannot be `NULL`, otherwise it will + return `UV_EDESTADDRREQ` error. + :returns: >= 0: number of bytes sent (it matches the given buffer size). < 0: negative error code (``UV_EAGAIN`` is returned when the message can't be sent immediately). + .. versionchanged:: 1.27.0 added support for connected sockets + .. c:function:: int uv_udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb, uv_udp_recv_cb recv_cb) Prepare for receiving data. If the socket has not previously been bound |