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) {...@@ -354,7 +354,7 @@ pub const NullFile = switch (native_os) {
354 }354 }
355 }355 }
356 },356 },
357 .wasi, .ios, .tvos, .visionos, .watchos => struct {357 .wasi, .tvos, .watchos => struct {
358 fn deinit(this: @This()) void {358 fn deinit(this: @This()) void {
359 _ = this;359 _ = this;
360 }360 }
...@@ -15259,9 +15259,9 @@ fn processReplace(userdata: ?*anyopaque, options: process.ReplaceOptions) proces...@@ -15259,9 +15259,9 @@ fn processReplace(userdata: ?*anyopaque, options: process.ReplaceOptions) proces
15259}15259}
1526015260
15261const processSpawn = switch (native_os) {15261const processSpawn = switch (native_os) {
15262 .wasi, .emscripten, .ios, .tvos, .visionos, .watchos => processSpawnUnsupported,15262 .wasi, .emscripten, .tvos, .watchos => processSpawnUnsupported,
15263 .windows => processSpawnWindows,15263 .windows => processSpawnWindows,
15264 .driverkit, .maccatalyst, .macos => processSpawnDarwin,15264 .driverkit, .ios, .maccatalyst, .macos, .visionos => processSpawnDarwin,
15265 else => processSpawnPosix,15265 else => processSpawnPosix,
15266};15266};
1526715267
lib/std/process.zig+2-2
...@@ -254,13 +254,13 @@ pub fn getBaseAddress() usize {...@@ -254,13 +254,13 @@ pub fn getBaseAddress() usize {
254/// process image. If this is `false` then calling `replace` or `replaceFile`254/// process image. If this is `false` then calling `replace` or `replaceFile`
255/// functions will return `error.OperationUnsupported`.255/// functions will return `error.OperationUnsupported`.
256pub const can_replace = switch (native_os) {256pub const can_replace = switch (native_os) {
257 .windows, .haiku, .wasi => false,257 .windows, .haiku, .wasi, .tvos, .watchos => false,
258 else => true,258 else => true,
259};259};
260260
261/// Tells whether spawning child processes is supported.261/// Tells whether spawning child processes is supported.
262pub const can_spawn = switch (native_os) {262pub const can_spawn = switch (native_os) {
263 .wasi, .ios, .tvos, .visionos, .watchos => false,263 .wasi, .tvos, .watchos => false,
264 else => true,264 else => true,
265};265};
266266