poll(2): Add POLLRDHUP.
authorThomas Munro <tmunro@FreeBSD.org>
Wed, 28 Apr 2021 09:31:38 +0000 (21:31 +1200)
committerSebastian Huber <sebastian.huber@embedded-brains.de>
Mon, 11 Jul 2022 11:19:29 +0000 (13:19 +0200)
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

index 7cdbbbb599fe4996b05908f78503af4e8532f9ff..cc6ad49db033dfc63714d5062da30bf08b364dc3 100644 (file)
@@ -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
 
 /*
This page took 0.079385 seconds and 5 git commands to generate.