[newlib 49/65] poll(2): Add POLLRDHUP.
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Jul 7 11:58:56 UTC 2022
From: Thomas Munro <tmunro at FreeBSD.org>
Teach poll(2) to support Linux-style POLLRDHUP events for sockets, if
requested. Triggered when the remote peer shuts down writing or closes
its end.
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D29757
---
newlib/libc/sys/rtems/include/sys/poll.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/newlib/libc/sys/rtems/include/sys/poll.h b/newlib/libc/sys/rtems/include/sys/poll.h
index 7cdbbbb59..cc6ad49db 100644
--- a/newlib/libc/sys/rtems/include/sys/poll.h
+++ b/newlib/libc/sys/rtems/include/sys/poll.h
@@ -71,6 +71,7 @@ struct pollfd {
#if __BSD_VISIBLE
/* General FreeBSD extension (currently only supported for sockets): */
#define POLLINIGNEOF 0x2000 /* like POLLIN, except ignore EOF */
+#define POLLRDHUP 0x4000 /* half shut down */
#endif
/*
--
2.35.3
More information about the devel
mailing list