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>
This commit is contained in:
Alex Rønne Petersen committed 2026-10-04 18:19:10 +02:00
commit 56023ff8fe
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -354,7 +354,7 @@ pub const NullFile = switch (native_os) {
}
}
},
.wasi, .ios, .tvos, .visionos, .watchos => struct {
.wasi, .tvos, .watchos => struct {
fn deinit(this: @This()) void {
_ = this;
}
@@ -15259,9 +15259,9 @@ fn processReplace(userdata: ?*anyopaque, options: process.ReplaceOptions) proces
}
const processSpawn = switch (native_os) {
.wasi, .emscripten, .ios, .tvos, .visionos, .watchos => processSpawnUnsupported,
.wasi, .emscripten, .tvos, .watchos => processSpawnUnsupported,
.windows => processSpawnWindows,
.driverkit, .maccatalyst, .macos => processSpawnDarwin,
.driverkit, .ios, .maccatalyst, .macos, .visionos => processSpawnDarwin,
else => processSpawnPosix,
};
+2 -2
View File
@@ -254,13 +254,13 @@ pub fn getBaseAddress() usize {
/// process image. If this is `false` then calling `replace` or `replaceFile`
/// functions will return `error.OperationUnsupported`.
pub const can_replace = switch (native_os) {
.windows, .haiku, .wasi => false,
.windows, .haiku, .wasi, .tvos, .watchos => false,
else => true,
};
/// Tells whether spawning child processes is supported.
pub const can_spawn = switch (native_os) {
.wasi, .ios, .tvos, .visionos, .watchos => false,
.wasi, .tvos, .watchos => false,
else => true,
};