This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 5e46a9908a vfs/fs_poll: not clear POLLIN event if POLLHUP or POLLERR 
set
5e46a9908a is described below

commit 5e46a9908a07045d21aa5851a4bdebd3774048a5
Author: wangbowen6 <wangbow...@xiaomi.com>
AuthorDate: Mon Sep 26 17:14:52 2022 +0800

    vfs/fs_poll: not clear POLLIN event if POLLHUP or POLLERR set
    
    Signed-off-by: wangbowen6 <wangbow...@xiaomi.com>
---
 fs/vfs/fs_poll.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/vfs/fs_poll.c b/fs/vfs/fs_poll.c
index 233ee570ee..0962dfcb20 100644
--- a/fs/vfs/fs_poll.c
+++ b/fs/vfs/fs_poll.c
@@ -312,9 +312,9 @@ void poll_notify(FAR struct pollfd **afds, int nfds, 
pollevent_t eventset)
           fds->revents |= eventset & (fds->events | POLLERR | POLLHUP);
           if ((fds->revents & (POLLERR | POLLHUP)) != 0)
             {
-              /* Error, clear POLLIN and POLLOUT event */
+              /* Error or Hung up, clear POLLOUT event */
 
-              fds->revents &= ~(POLLIN | POLLOUT);
+              fds->revents &= ~POLLOUT;
             }
 
           if (fds->revents != 0)

Reply via email to