commit dd7be75f7c5a52f838eca0d3f3cd3c7b552adff1 (tree)
parent e55fa3d525aeb72d0b8efec96daa84c32c38a1c5
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sat, 3 Jan 2026 00:52:15 -0800
std.process: add missing error.OperationUnsupported
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig
@@ -12820,7 +12820,7 @@ const processSpawn = switch (native_os) {
fn processSpawnUnsupported(userdata: ?*anyopaque, options: process.SpawnOptions) process.SpawnError!process.Child {
_ = userdata;
_ = options;
- return error.Unexpected;
+ return error.OperationUnsupported;
}
const Spawned = struct {
diff --git a/lib/std/process.zig b/lib/std/process.zig
@@ -328,6 +328,8 @@ pub const ArgExpansion = enum { expand, no_expand };
pub const WindowsExtension = enum { bat, cmd, com, exe };
pub const SpawnError = error{
+ /// The operating system does not support creating child processes.
+ OperationUnsupported,
OutOfMemory,
/// POSIX-only. `StdIo.ignore` was selected and opening `/dev/null` returned ENODEV.
NoDevice,