summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2014-04-20 16:22:31 -0700
committerStanislav Malyshev <stas@php.net>2014-04-20 16:23:43 -0700
commit6bad228b4e0c2429bc2f62f447b56ac54c2f5b04 (patch)
tree455628176f99b36704725436751eaed8a4475961 /sapi
parent5addf223d597c56638a34f9ef0061d454e748abe (diff)
parent49341e992ad7f8eb7f94d4c946fb74f8e33e7e75 (diff)
downloadphp-git-6bad228b4e0c2429bc2f62f447b56ac54c2f5b04.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fix #66908: php-fpm reload leaks epoll_create() file descriptor
Diffstat (limited to 'sapi')
-rw-r--r--sapi/fpm/fpm/events/epoll.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sapi/fpm/fpm/events/epoll.c b/sapi/fpm/fpm/events/epoll.c
index 2857ea2a09..b55cb44b15 100644
--- a/sapi/fpm/fpm/events/epoll.c
+++ b/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;