Skip to content

Commit 9719743

Browse files
authored
Upgrade libuv to v1.53.0 (#775)
1 parent 07b10a4 commit 9719743

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎uvloop/handles/process.pyx‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ cdef class UVProcess(UVHandle):
4747
self._handle.data = NULL
4848

4949
force_fork = False
50-
if system.PLATFORM_IS_APPLE and not (
51-
preexec_fn is None
52-
and not pass_fds
53-
):
50+
if preexec_fn is not None or pass_fds:
5451
# see _execute_child() in CPython/subprocess.py
5552
force_fork = True
5653

@@ -255,15 +252,16 @@ cdef class UVProcess(UVHandle):
255252
self.options.flags |= uv.UV_PROCESS_DETACHED
256253

257254
if force_fork:
258-
# This is a hack to work around the change in libuv 1.44:
259-
# > macos: use posix_spawn instead of fork
255+
# This is a hack to work around the change in libuv:
256+
# 1.44 > macos: use posix_spawn instead of fork
257+
# 1.53 > unix: use posix_spawn instead of fork
260258
# where Python subprocess options like preexec_fn are
261259
# crippled. CPython only uses posix_spawn under a pretty
262260
# strict list of conditions (see subprocess.py), and falls
263261
# back to using fork() otherwise. We'd like to simulate such
264262
# behavior with libuv, but unfortunately libuv doesn't
265263
# provide explicit API to choose such implementation detail.
266-
# Based on current (libuv 1.46) behavior, setting
264+
# Based on current (libuv 1.53) behavior, setting
267265
# UV_PROCESS_SETUID or UV_PROCESS_SETGID would reliably make
268266
# libuv fallback to use fork, so let's just use it for now.
269267
self.options.flags |= uv.UV_PROCESS_SETUID

‎vendor/libuv‎

Submodule libuv updated 125 files

0 commit comments

Comments
 (0)