2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fix epoll error on the old kernel 2.6.8 or ealier.
	* src/EpollEventPoll.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-02-11 10:34:43 +00:00
parent 56366759fc
commit cf20e207d4
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fix epoll error on the old kernel 2.6.8 or ealier.
* src/EpollEventPoll.cc
2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use Util::parseLLInt instead of sscanf for portability. The

View File

@ -474,7 +474,10 @@ bool EpollEventPoll::deleteEvents(sock_t socket,
int r = 0;
if((*i)->eventEmpty()) {
r = epoll_ctl(_epfd, EPOLL_CTL_DEL, (*i)->getSocket(), 0);
// In kernel before 2.6.9, epoll_ctl with EPOLL_CTL_DEL requires non-null
// pointer of epoll_event.
struct epoll_event ev = {0,{0}};
r = epoll_ctl(_epfd, EPOLL_CTL_DEL, (*i)->getSocket(), &ev);
_socketEntries.erase(i);
} else {
// If socket is closed, then it seems it is automatically removed from