Browse Source

fix file descriptor leak of epollfd

pull/627/head
Julio Pintos 13 years ago
parent
commit
4c70701e58
  1. 6
      sapi/fpm/fpm/events/epoll.c

6
sapi/fpm/fpm/events/epoll.c

@ -46,7 +46,7 @@ static struct fpm_event_module_s epoll_module = {
static struct epoll_event *epollfds = NULL;
static int nepollfds = 0;
static int epollfd = 0;
static int epollfd = -1;
#endif /* HAVE_EPOLL */
@ -103,6 +103,10 @@ static int fpm_event_epoll_clean() /* {{{ */
free(epollfds);
epollfds = NULL;
}
if (epollfd != -1) {
close(epollfd);
epollfd = -1;
}
nepollfds = 0;

Loading…
Cancel
Save