Compare commits

...

1 Commits

Author SHA1 Message Date
Codex + Matthew Zeng
6084fcf0f3 Fix sandbox multiprocessing test on Python 3.14 2026-01-16 12:30:50 -08:00

View File

@@ -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")