r12146: as epoll notifies EPOLLERR and EPOLLHUP implicit,
authorStefan Metzmacher <metze@samba.org>
Fri, 9 Dec 2005 17:49:48 +0000 (17:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:47:14 +0000 (13:47 -0500)
let our code make it explicit, to make it clear

metze

source/lib/events/events_standard.c

index bd06cbfe96827f3b12ee13afac7f11c61be3897f..abf17dd710b027bf59841d7a1087d0e4280a0254 100644 (file)
@@ -92,8 +92,8 @@ static void epoll_fallback_to_select(struct std_event_context *std_ev, const cha
 static uint32_t epoll_map_flags(uint16_t flags)
 {
        uint32_t ret = 0;
-       if (flags & EVENT_FD_READ) ret |= EPOLLIN;
-       if (flags & EVENT_FD_WRITE) ret |= EPOLLOUT;
+       if (flags & EVENT_FD_READ) ret |= (EPOLLIN | EPOLLERR | EPOLLHUP);
+       if (flags & EVENT_FD_WRITE) ret |= (EPOLLOUT | EPOLLERR | EPOLLHUP);
        return ret;
 }