]> Cypherpunks repositories - gostls13.git/commit
internal/poll: honor ERROR_OPERATION_ABORTED if pipe is not closed
authorqmuntal <quimmuntal@gmail.com>
Fri, 28 Mar 2025 19:38:34 +0000 (20:38 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 28 Mar 2025 21:14:48 +0000 (14:14 -0700)
commitb9934d855c4635edf02092a72802017676abd8eb
tree1e349674d9b21af9d29933a9a92b7842cf2a261a
parent5ec76ae5aa965208d820a0bde8f0abd685c17ecc
internal/poll: honor ERROR_OPERATION_ABORTED if pipe is not closed

FD.Read converts a syscall.ERROR_OPERATION_ABORTED error to
ErrFileClosing. It does that in case the pipe operation was aborted by
a CancelIoEx call in FD.Close.

It doesn't take into account that the operation might have been
aborted by a CancelIoEx call in external code. In that case, the
operation should return the error as is.

Change-Id: I75dcf0edaace8b57dc47b398ea591ca9f116112b
Reviewed-on: https://go-review.googlesource.com/c/go/+/661555
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/internal/poll/fd_mutex.go
src/internal/poll/fd_windows.go
src/internal/poll/fd_windows_test.go