diff --git a/fs/vfs/fs_poll.c b/fs/vfs/fs_poll.c index 429addd64e3..9c784baf81f 100644 --- a/fs/vfs/fs_poll.c +++ b/fs/vfs/fs_poll.c @@ -120,6 +120,7 @@ static inline int poll_setup(FAR struct pollfd *fds, nfds_t nfds, fds[i].sem = sem; fds[i].revents = 0; fds[i].priv = NULL; + fds[i].events |= POLLERR | POLLHUP; /* Check for invalid descriptors. "If the value of fd is less than 0, * events shall be ignored, and revents shall be set to 0 in that entry