authorgravatar for enfipy@gmail.comDavid <enfipy@gmail.com> 2026-10-03 16:28:20+04:00
committergravatar for enfipy@gmail.comDavid <enfipy@gmail.com> 2026-10-03 17:10:32+04:00
log0bfd34342bdd9ae2179150bfce7fcc7b2014ea49
treef463b92a237537522986f6bc77474e3738a79faf
parentc31cb992737dd9eb7d910caeaa5259a65eac5b6e

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
1521415214 });
1521515215 };
1521615216
15217 if (is_darwin) if (t.spawnDarwin(
15217 if (is_darwin and process.can_spawn) if (t.spawnDarwin(
1521815218 .replace,
1521915219 options.exe,
1522015220 argv_buf.ptr,