From d377930e34626622a856912a82ec2099b1a13eb3 Mon Sep 17 00:00:00 2001 From: Fantix King Date: Tue, 6 Oct 2026 10:13:37 -0400 Subject: [PATCH] Upgrade libuv to v1.53.0 --- uvloop/handles/process.pyx | 12 +++++------- vendor/libuv | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/uvloop/handles/process.pyx b/uvloop/handles/process.pyx index 63b982ae5..18bf9fdae 100644 --- a/uvloop/handles/process.pyx +++ b/uvloop/handles/process.pyx @@ -47,10 +47,7 @@ cdef class UVProcess(UVHandle): self._handle.data = NULL force_fork = False - if system.PLATFORM_IS_APPLE and not ( - preexec_fn is None - and not pass_fds - ): + if preexec_fn is not None or pass_fds: # see _execute_child() in CPython/subprocess.py force_fork = True @@ -255,15 +252,16 @@ cdef class UVProcess(UVHandle): self.options.flags |= uv.UV_PROCESS_DETACHED if force_fork: - # This is a hack to work around the change in libuv 1.44: - # > macos: use posix_spawn instead of fork + # This is a hack to work around the change in libuv: + # 1.44 > macos: use posix_spawn instead of fork + # 1.53 > unix: use posix_spawn instead of fork # where Python subprocess options like preexec_fn are # crippled. CPython only uses posix_spawn under a pretty # strict list of conditions (see subprocess.py), and falls # back to using fork() otherwise. We'd like to simulate such # behavior with libuv, but unfortunately libuv doesn't # provide explicit API to choose such implementation detail. - # Based on current (libuv 1.46) behavior, setting + # Based on current (libuv 1.53) behavior, setting # UV_PROCESS_SETUID or UV_PROCESS_SETGID would reliably make # libuv fallback to use fork, so let's just use it for now. self.options.flags |= uv.UV_PROCESS_SETUID diff --git a/vendor/libuv b/vendor/libuv index 1cfa32ff5..840404ce8 160000 --- a/vendor/libuv +++ b/vendor/libuv @@ -1 +1 @@ -Subproject commit 1cfa32ff59c076ffb6ed735bbc8c18361558661f +Subproject commit 840404ce8ba7cc0204be52389a6cfff9f2c90fb6