diff --git a/lib/std/process/Preopens.zig b/lib/std/process/Preopens.zig index 8223c29f83fadce644c49c874e0039d9e090ed96..3baf696ee9a5d95dbf2bed352ea4867e8c3fde8c 100644 --- a/lib/std/process/Preopens.zig +++ b/lib/std/process/Preopens.zig @@ -29,7 +29,10 @@ pub fn get(p: *const Preopens, name: []const u8) ?Resource { switch (native_os) { .wasi => { const index = p.map.getIndex(name) orelse return null; - if (index <= 2) return .{ .file = .{ .handle = @intCast(index) } }; + if (index <= 2) return .{ .file = .{ + .handle = @intCast(index), + .flags = .{ .nonblocking = false }, + } }; return .{ .dir = .{ .handle = @intCast(index) } }; }, else => {