From 0bfd34342bdd9ae2179150bfce7fcc7b2014ea49 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 3 Oct 2026 16:28:20 +0400 Subject: [PATCH] std.Io.Threaded: only use spawnDarwin in processReplace when spawning is supported ios, tvos, visionos and watchos can't spawn processes, so their null_file has no fd and spawnDarwin doesn't compile for them. The vtable always references processReplace and the default panic handler uses Threaded, so nearly every program for these targets failed to compile. Fall back to posixExec there, as before 9fe0ebe108. closes https://codeberg.org/ziglang/zig/issues/37061 --- lib/std/Io/Threaded.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig index 2c7cdbc8e99e37081200900866b94edf7672e272..4b1693cbd1ab92c67090a790cdde9e244c9d5f57 100644 --- a/lib/std/Io/Threaded.zig +++ b/lib/std/Io/Threaded.zig @@ -15214,7 +15214,7 @@ fn processReplace(userdata: ?*anyopaque, options: process.ReplaceOptions) proces }); }; - if (is_darwin) if (t.spawnDarwin( + if (is_darwin and process.can_spawn) if (t.spawnDarwin( .replace, options.exe, argv_buf.ptr, -- 2.54.0