authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-04 18:19:10+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-04 18:19:10+02:00
log56023ff8fe2c110bb408daae809a882095d9bad9
tree25a3c629dccc18e7efe45c8008cd07cf7c5e12e6
parent59a501a9ac36a46fe4baa5d7245c3d64b0e13394
parentc92c8ef8cf6ef32e8242e7e55bc065171b8d49cb

Merge pull request 'std.Io.Threaded: only use spawnDarwin in processReplace when spawning is supported' (#37063) from enfipy/zig:std-threaded-ios-process-replace into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37063 Reviewed-by: Jacob Young <jacobly@ziglang.org>

2 files changed, 5 insertions(+), 5 deletions(-)

lib/std/Io/Threaded.zig+3-3
......@@ -354,7 +354,7 @@ pub const NullFile = switch (native_os) {
354354 }
355355 }
356356 },
357 .wasi, .ios, .tvos, .visionos, .watchos => struct {
357 .wasi, .tvos, .watchos => struct {
358358 fn deinit(this: @This()) void {
359359 _ = this;
360360 }
......@@ -15259,9 +15259,9 @@ fn processReplace(userdata: ?*anyopaque, options: process.ReplaceOptions) proces
1525915259}
1526015260
1526115261const processSpawn = switch (native_os) {
15262 .wasi, .emscripten, .ios, .tvos, .visionos, .watchos => processSpawnUnsupported,
15262 .wasi, .emscripten, .tvos, .watchos => processSpawnUnsupported,
1526315263 .windows => processSpawnWindows,
15264 .driverkit, .maccatalyst, .macos => processSpawnDarwin,
15264 .driverkit, .ios, .maccatalyst, .macos, .visionos => processSpawnDarwin,
1526515265 else => processSpawnPosix,
1526615266};
1526715267
lib/std/process.zig+2-2
......@@ -254,13 +254,13 @@ pub fn getBaseAddress() usize {
254254/// process image. If this is `false` then calling `replace` or `replaceFile`
255255/// functions will return `error.OperationUnsupported`.
256256pub const can_replace = switch (native_os) {
257 .windows, .haiku, .wasi => false,
257 .windows, .haiku, .wasi, .tvos, .watchos => false,
258258 else => true,
259259};
260260
261261/// Tells whether spawning child processes is supported.
262262pub const can_spawn = switch (native_os) {
263 .wasi, .ios, .tvos, .visionos, .watchos => false,
263 .wasi, .tvos, .watchos => false,
264264 else => true,
265265};
266266