* 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:
Corinna Vinschen
2000-08-11 12:51:47 +00:00
parent 7b972f5da5
commit e82d75cc2b
3 changed files with 30 additions and 20 deletions

View File

@ -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. */