aboutsummaryrefslogtreecommitdiff
path: root/src/internal/syscall
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2025-03-28 10:39:49 +0100
committerQuim Muntal <quimmuntal@gmail.com>2025-03-28 09:44:35 -0700
commit656b5b3abe25d026725edff49edbdaa9862c9d77 (patch)
treefd6018a51e1d722d1f9365e4f6700fa36984c23c /src/internal/syscall
parente6c2e12c63db5b24724db873009373af413cd1ea (diff)
downloadgo-656b5b3abe25d026725edff49edbdaa9862c9d77.tar.xz
internal/poll: don't skip empty writes on Windows
Empty writes might be important for some protocols. Let Windows decide what do with them rather than skipping them on our side. This is inline with the behavior of other platforms. While here, refactor the Read/Write/Pwrite methods to reduce one indentation level and make the code easier to read. Fixes #73084. Change-Id: Ic5393358e237d53b8be6097cd7359ac0ff205309 Reviewed-on: https://go-review.googlesource.com/c/go/+/661435 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/internal/syscall')
-rw-r--r--src/internal/syscall/windows/syscall_windows.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/internal/syscall/windows/syscall_windows.go b/src/internal/syscall/windows/syscall_windows.go
index af542c8003..3a197f1c26 100644
--- a/src/internal/syscall/windows/syscall_windows.go
+++ b/src/internal/syscall/windows/syscall_windows.go
@@ -509,7 +509,8 @@ const (
PIPE_ACCESS_OUTBOUND = 0x00000002
PIPE_ACCESS_DUPLEX = 0x00000003
- PIPE_TYPE_BYTE = 0x00000000
+ PIPE_TYPE_BYTE = 0x00000000
+ PIPE_TYPE_MESSAGE = 0x00000004
)
//sys GetOverlappedResult(handle syscall.Handle, overlapped *syscall.Overlapped, done *uint32, wait bool) (err error)