From 353b4ac6c70513a888e3dd18511e6553c0fb0e71 Mon Sep 17 00:00:00 2001 From: Trond Norbye Date: Sun, 2 Jan 2011 10:17:15 +0100 Subject: [PATCH] Check for POLLERR, POLLHUP and POLLNVAL for Solaris event ports --- evport.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/evport.c b/evport.c index a2ee1bce..1f5ebc41 100644 --- a/evport.c +++ b/evport.c @@ -367,6 +367,12 @@ evport_dispatch(struct event_base *base, void *arg, struct timeval *tv) if (pevt->portev_events & POLLOUT) res |= EV_WRITE; + /* + * Check for the error situations or a hangup situation + */ + if (pevt->portev_events & (POLLERR|POLLHUP|POLLNVAL)) + res |= EV_READ|EV_WRITE; + assert(epdp->ed_nevents > fd); fdi = &(epdp->ed_fds[fd]);