Skip to content

Commit 6bad228

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fix #66908: php-fpm reload leaks epoll_create() file descriptor
2 parents 5addf22 + 49341e9 commit 6bad228

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ PHP NEWS
1414
. Fixed bug #67081 (DOMDocumentType->internalSubset returns entire DOCTYPE tag,
1515
not only the subset). (Anatol)
1616

17+
- FPM:
18+
. Fixed bug #66908 (php-fpm reload leaks epoll_create() file descriptor).
19+
(Julio Pintos)
20+
1721
?? ??? 2014, PHP 5.5.12
1822
- Core:
1923
. Fixed bug #61019 (Out of memory on command stream_get_contents). (Mike)

sapi/fpm/fpm/events/epoll.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static struct fpm_event_module_s epoll_module = {
4646

4747
static struct epoll_event *epollfds = NULL;
4848
static int nepollfds = 0;
49-
static int epollfd = 0;
49+
static int epollfd = -1;
5050

5151
#endif /* HAVE_EPOLL */
5252

@@ -103,6 +103,10 @@ static int fpm_event_epoll_clean() /* {{{ */
103103
free(epollfds);
104104
epollfds = NULL;
105105
}
106+
if (epollfd != -1) {
107+
close(epollfd);
108+
epollfd = -1;
109+
}
106110

107111
nepollfds = 0;
108112

0 commit comments

Comments
 (0)