… | |
… | |
159 | /* we received an event but are not interested in it, try mod or del */ |
159 | /* we received an event but are not interested in it, try mod or del */ |
160 | /* I don't think we ever need MOD, but let's handle it anyways */ |
160 | /* I don't think we ever need MOD, but let's handle it anyways */ |
161 | ev->events = (want & EV_READ ? EPOLLIN : 0) |
161 | ev->events = (want & EV_READ ? EPOLLIN : 0) |
162 | | (want & EV_WRITE ? EPOLLOUT : 0); |
162 | | (want & EV_WRITE ? EPOLLOUT : 0); |
163 | |
163 | |
|
|
164 | /* pre-2.6.9 kernels require a non-null pointer with EPOLL_CTL_DEL, */ |
|
|
165 | /* which is fortunately easy to do for us. */ |
164 | if (epoll_ctl (backend_fd, want ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, ev)) |
166 | if (epoll_ctl (backend_fd, want ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, ev)) |
165 | { |
167 | { |
166 | postfork = 1; /* an error occured, recreate kernel state */ |
168 | postfork = 1; /* an error occured, recreate kernel state */ |
167 | continue; |
169 | continue; |
168 | } |
170 | } |