13 Commits

Author SHA1 Message Date
xeondev 2b48f559f4 std.Io: move netRead to become an Operation 2026-04-16 22:13:29 +02:00
Jonathan Marler f4eecf8d7d handle EROFS in create/open file
I hit an unexpected errno 30 on macos attempting to call createFile on a
directory in PATH.  errno 30 is EROFS, this change propagates that error
as error.ReadOnlyFileSystem.
2026-04-02 15:05:31 +02:00
Jacob Young 9ac1386c10 std.Io.Threaded: windows networking without ws2_32 2026-03-18 20:13:59 -04:00
Leslie Lau 4d5721214f fix (Io/Dispatch): alignment type reflection compile errors (#31538)
Fixes compilation errors when using Io.Evented on macOS.

closes #31526

Co-authored-by: Leslie-Lau <804738464@qq.com>
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31538
Co-authored-by: Leslie Lau <here-leslie-lau@noreply.codeberg.org>
Co-committed-by: Leslie Lau <here-leslie-lau@noreply.codeberg.org>
2026-03-17 18:59:28 +01:00
Andrew Kelley dd8de03720 std.Io.Dispatch: fix compile errors 2026-03-08 19:20:06 -07:00
Ryan Liptak 6be202f466 Io: Add processSetCurrentPath
The logic used to allow providing a path for setting the CWD of a child process in https://codeberg.org/ziglang/zig/pulls/31090 applies here as well:

- Windows must provide a path when setting the CWD, so the path of an `Io.Dir` must be resolved before actually calling RtlSetCurrentDirectory_U
- A directory handle may have multiple paths associated with it, so providing the CWD as a string retains a legitimate use case in cases where the precise path matters
2026-03-09 03:19:11 +01:00
breakmit 46658257f4 Io.Threaded.spawnPosix: implement passing file descriptors as stdio (#31379)
`std.process.spawn`: remove the TODO for nonblocking file stdio and document the behavior.

Fix a bug in Io.Uring.dup2 where the function does not return on success

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31379
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: breakmit <breakmit@noreply.codeberg.org>
Co-committed-by: breakmit <breakmit@noreply.codeberg.org>
2026-03-06 04:51:28 +01:00
Andrew Kelley 02142a54d2 std.Io: remove cancelation propagation assertions
While the general guidance remains useful, it is not the case that
error.Canceled will always pass across the Group task function boundary.

Remove the too-aggressive assertions and add unit test coverage.

Closes #30096
Closes #31340
Closes #31358
2026-02-28 05:07:54 +01:00
Jacob Young 5763f7dbcc std.Io.Evented: clean up supporting code for select 2026-02-15 05:52:07 -05:00
Andrew Kelley d9fc7fa04d std.Io: remove select function
This function works with a slice of futures and returns the index of a
completed one. This doesn't work very well in practice because it's
either too high level or too low level.

At the lower level we have Io.Batch for doing this kind of thing at the
Operation API layer.

At the higher level we have Io.Select which is a convenience wrapper
around an Io.Group and an Io.Queue.
2026-02-14 18:31:48 -08:00
Jacob Young 771047ae93 Io.Dispatch.sleep: add cancelation support 2026-02-14 16:26:49 -05:00
Jacob Young b7f93695f9 Io.Dispatch.Mutex: fix deadlock conditions 2026-02-14 05:52:59 -05:00
Jacob Young 2fa1a78491 Io.Dispatch: introduce grand central dispatch io impl 2026-02-13 12:29:40 -05:00