From 6084fcf0f37ae8542b7f7d82799a46a174b947d5 Mon Sep 17 00:00:00 2001 From: Codex + Matthew Zeng Date: Fri, 16 Jan 2026 12:30:50 -0800 Subject: [PATCH] Fix sandbox multiprocessing test on Python 3.14 --- codex-rs/exec/tests/suite/sandbox.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/codex-rs/exec/tests/suite/sandbox.rs b/codex-rs/exec/tests/suite/sandbox.rs index 303023b158..8f0104a347 100644 --- a/codex-rs/exec/tests/suite/sandbox.rs +++ b/codex-rs/exec/tests/suite/sandbox.rs @@ -77,8 +77,17 @@ async fn python_multiprocessing_lock_works_under_sandbox() { }; let python_code = r#"import multiprocessing +import sys from multiprocessing import Lock, Process +# Python 3.14 defaults to forkserver on some Linux distros, which can +# be blocked by the sandbox. Force fork to keep the test stable. +if sys.platform.startswith("linux"): + try: + multiprocessing.set_start_method("fork") + except RuntimeError: + pass + def f(lock): with lock: print("Lock acquired in child process")