poll: defalut set POLLERR POLLHUP to events
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
434c49f282
commit
5f68aa56fd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue