bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/4] lwip: poll(): return EIO when POLLERR is set


From: Joan Lledó
Subject: [PATCH 1/4] lwip: poll(): return EIO when POLLERR is set
Date: Sat, 11 Aug 2018 18:17:07 +0200

Needed to properly support poll in glibc (_hurd_select).

* lwip/io-ops.c (lwip_io_select_common):
If POLLERR is set, return EIO.
---
 lwip/io-ops.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lwip/io-ops.c b/lwip/io-ops.c
index 636c26f7..1429bc55 100644
--- a/lwip/io-ops.c
+++ b/lwip/io-ops.c
@@ -229,6 +229,9 @@ lwip_io_select_common (struct sock_user *user,
 
   if (ret > 0)
     {
+      if (fdp.revents & POLLERR)
+       return EIO;
+
       if (fdp.revents & POLLIN)
        *select_type |= SELECT_READ;
 
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]