mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-5.6'
* PHP-5.6: NEWS NEWS Fixed bug #67406 built-in web-server segfaults on startup
This commit is contained in:
commit
39885d0819
1 changed files with 3 additions and 5 deletions
|
@ -893,13 +893,11 @@ static void php_cli_server_poller_remove(php_cli_server_poller *poller, int mode
|
|||
#endif
|
||||
} /* }}} */
|
||||
|
||||
static int php_cli_server_poller_poll(php_cli_server_poller *poller, const struct timeval *tv) /* {{{ */
|
||||
static int php_cli_server_poller_poll(php_cli_server_poller *poller, struct timeval *tv) /* {{{ */
|
||||
{
|
||||
struct timeval t = *tv;
|
||||
|
||||
memmove(&poller->active.rfds, &poller->rfds, sizeof(poller->rfds));
|
||||
memmove(&poller->active.wfds, &poller->wfds, sizeof(poller->wfds));
|
||||
return php_select(poller->max_fd + 1, &poller->active.rfds, &poller->active.wfds, NULL, &t);
|
||||
return php_select(poller->max_fd + 1, &poller->active.rfds, &poller->active.wfds, NULL, tv);
|
||||
} /* }}} */
|
||||
|
||||
static int php_cli_server_poller_iter_on_active(php_cli_server_poller *poller, void *opaque, int(*callback)(void *, int fd, int events)) /* {{{ */
|
||||
|
@ -2475,7 +2473,7 @@ static int php_cli_server_do_event_loop(php_cli_server *server TSRMLS_DC) /* {{{
|
|||
{
|
||||
int retval = SUCCESS;
|
||||
while (server->is_running) {
|
||||
static const struct timeval tv = { 1, 0 };
|
||||
struct timeval tv = { 1, 0 };
|
||||
int n = php_cli_server_poller_poll(&server->poller, &tv);
|
||||
if (n > 0) {
|
||||
php_cli_server_do_event_for_each_fd(server,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue