You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2022/09/26 23:24:40 UTC
[incubator-nuttx] branch master updated: vfs/fs_poll: not clear POLLIN event if POLLHUP or POLLERR set
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 <wa...@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 <wa...@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)