diff options
| author | Julian Noble <julian@precisium.com.au> | 2024-10-30 01:10:19 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 15:10:19 +0100 |
| commit | a03ab9ee01129913af526a38b688313ccd83dca2 (patch) | |
| tree | 385470c1387945fa8a31686c300dd15a18427235 /lib/std | |
| parent | b5cafe223a5ed90fe1a10f6d0c1e492f81f4b586 (diff) | |
| download | zig-a03ab9ee01129913af526a38b688313ccd83dca2.tar.gz zig-a03ab9ee01129913af526a38b688313ccd83dca2.zip | |
std.os.windows.WriteFile: Map ERROR_NO_DATA to error.BrokenPipe instead of ERROR_BROKEN_PIPE (#21811)
It appears that ReadFile returns ERROR_BROKEN_PIPE for a broken pipe, but WriteFile returns ERROR_NO_DATA.
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/os/windows.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index 7a460d5a9e..dbd6df46b7 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -682,7 +682,7 @@ pub fn WriteFile( .OPERATION_ABORTED => return error.OperationAborted, .NOT_ENOUGH_QUOTA => return error.SystemResources, .IO_PENDING => unreachable, - .BROKEN_PIPE => return error.BrokenPipe, + .NO_DATA => return error.BrokenPipe, .INVALID_HANDLE => return error.NotOpenForWriting, .LOCK_VIOLATION => return error.LockViolation, .NETNAME_DELETED => return error.ConnectionResetByPeer, |
