poll() now returns POLLERR for any file descriptor that returns a failure during the poll setup

This commit is contained in:
Gregory Nutt 2015-08-13 14:58:52 -06:00
parent 3f8a084d01
commit 48107bf073
2 changed files with 12 additions and 2 deletions

View File

@ -10806,11 +10806,18 @@
* Networking: Allow receipt of empty UDP packets. From Max Neklyudov
(2015-08-11).
* drivers/sensors/mb7040.c and include/nuttx/sensors/mb7040.h: Add
support for a MB7040 sonar driver. From Paul Alexander Patience (2015-08-11).
support for a MB7040 sonar driver. From Paul Alexander Patience
(2015-08-11).
* net/udp: Add support for send() for connected UDP sockets
(2015-08-11).
* drivers/sensors/ms5805.c and include/nuttx/sensors/ms5805.h: Add
support for an MS5805 altimeter. From Paul Alexander Patience
(2015-08-07).
(2015-08-12).
7.12 2015-xx-xx Gregory Nutt <gnutt@nuttx.org>
* fs/vfs/fs_poll.c: Use sem_tickwait() insteadk of sem_timedwait()
From Macs Neklyudov (2015-08-13).
* fs/vfs/fs_poll.c: If we fail to setup the poll for any file
descriptor, for any reason, set the POLLERR bit (2015-08-13).

View File

@ -176,6 +176,9 @@ static inline int poll_setup(FAR struct pollfd *fds, nfds_t nfds, sem_t *sem)
(void)poll_fdsetup(fds[j].fd, &fds[j], false);
}
/* Indicate an error on the file discriptor */
fds[i].revents |= POLLERR;
return ret;
}
}