# std.os.windows.WriteFile: Map ERROR_NO_DATA to error.BrokenPipe instead of ERROR_BROKEN_PIPE \(\#21811\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a03ab9ee01129913af526a38b688313ccd83dca2)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a03ab9ee01129913af526a38b688313ccd83dca2

Requested commit: a03ab9ee01129913af526a38b688313ccd83dca2

Commit: a03ab9ee01129913af526a38b688313ccd83dca2

Tree: 385470c1387945fa8a31686c300dd15a18427235

Author: Julian Noble

Committer: GitHub

## Message

```
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>
```

## Parents

- [b5cafe223a5ed90fe1a10f6d0c1e492f81f4b586](https://git.cafe/gitcafe/zig/commit/b5cafe223a5ed90fe1a10f6d0c1e492f81f4b586?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a03ab9ee01129913af526a38b688313ccd83dca2?format=markdown)
