authorgravatar for enfipy@gmail.comDavid <enfipy@gmail.com> 2026-10-03 16:28:20+04:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-04 18:21:25+02:00
log6171a2be743e466edc53eccf600253adccd7599b
tree6700d196f4f10bba68b532f07e69bec18394dcf5
parentc629ee4e08d6753793dc48def6796184769179ee
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/Io/Threaded.zig+1-1
...@@ -15214,7 +15214,7 @@ fn processReplace(userdata: ?*anyopaque, options: process.ReplaceOptions) proces...@@ -15214,7 +15214,7 @@ fn processReplace(userdata: ?*anyopaque, options: process.ReplaceOptions) proces
15214 });15214 });
15215 };15215 };
1521615216
15217 if (is_darwin) if (t.spawnDarwin(15217 if (is_darwin and process.can_spawn) if (t.spawnDarwin(
15218 .replace,15218 .replace,
15219 options.exe,15219 options.exe,
15220 argv_buf.ptr,15220 argv_buf.ptr,