* poll.cc: Add bounds checking for file descriptors. Return POLLNVAL
if fd is invalid. Return POLLERR for each valid fd if cygwin_select returned with error. include/sys/poll.h: Change POLLERR comment according to above change.
This commit is contained in:
@ -18,7 +18,7 @@ __BEGIN_DECLS
|
||||
#define POLLIN 1 /* Set if data to read. */
|
||||
#define POLLPRI 2 /* Set if urgent data to read. */
|
||||
#define POLLOUT 4 /* Set if writing data wouldn't block. */
|
||||
#define POLLERR 8 /* An error occured, not used by Cygwin. */
|
||||
#define POLLERR 8 /* An error occured. */
|
||||
#define POLLHUP 16 /* Shutdown or close happened. */
|
||||
#define POLLNVAL 32 /* Invalid file descriptor. */
|
||||
|
||||
|
Reference in New Issue
Block a user