From 71132f5fbd80ad7e1b3940bc6689c31a6e0f195b Mon Sep 17 00:00:00 2001 From: Eli Lindsey Date: Thu, 22 Aug 2024 20:42:27 -0400 Subject: [PATCH] unix: add POLLRDHUP to FreeBSD POLLRDHUP is a poll(2) event applicable to stream sockets that notifies when a remote peer closes a connection. Change-Id: I03a192426f89bbd08fb27dda2716ffb888043c92 Reviewed-on: https://go-review.googlesource.com/c/sys/+/607797 Auto-Submit: Ian Lance Taylor Reviewed-by: Cherry Mui Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- unix/types_freebsd.go | 1 + unix/ztypes_freebsd_386.go | 1 + unix/ztypes_freebsd_amd64.go | 1 + unix/ztypes_freebsd_arm.go | 1 + unix/ztypes_freebsd_arm64.go | 1 + unix/ztypes_freebsd_riscv64.go | 1 + 6 files changed, 6 insertions(+) diff --git a/unix/types_freebsd.go b/unix/types_freebsd.go index 23e3a026a..601096ee5 100644 --- a/unix/types_freebsd.go +++ b/unix/types_freebsd.go @@ -356,6 +356,7 @@ const ( POLLRDNORM = C.POLLRDNORM POLLWRBAND = C.POLLWRBAND POLLWRNORM = C.POLLWRNORM + POLLRDHUP = C.POLLRDHUP ) // Capabilities diff --git a/unix/ztypes_freebsd_386.go b/unix/ztypes_freebsd_386.go index 6cbd094a3..51e13eb05 100644 --- a/unix/ztypes_freebsd_386.go +++ b/unix/ztypes_freebsd_386.go @@ -625,6 +625,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/unix/ztypes_freebsd_amd64.go b/unix/ztypes_freebsd_amd64.go index 7c03b6ee7..d002d8ef3 100644 --- a/unix/ztypes_freebsd_amd64.go +++ b/unix/ztypes_freebsd_amd64.go @@ -630,6 +630,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/unix/ztypes_freebsd_arm.go b/unix/ztypes_freebsd_arm.go index 422107ee8..3f863d898 100644 --- a/unix/ztypes_freebsd_arm.go +++ b/unix/ztypes_freebsd_arm.go @@ -616,6 +616,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/unix/ztypes_freebsd_arm64.go b/unix/ztypes_freebsd_arm64.go index 505a12acf..61c729310 100644 --- a/unix/ztypes_freebsd_arm64.go +++ b/unix/ztypes_freebsd_arm64.go @@ -610,6 +610,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/unix/ztypes_freebsd_riscv64.go b/unix/ztypes_freebsd_riscv64.go index cc986c790..b5d17414f 100644 --- a/unix/ztypes_freebsd_riscv64.go +++ b/unix/ztypes_freebsd_riscv64.go @@ -612,6 +612,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct {