Mercurial > hg > nginx-vendor-0-8
diff src/event/ngx_event.c @ 356:b743d290eb3b NGINX_0_6_22
nginx 0.6.22
*) Change: now all ngx_http_perl_module methods return values copied to
perl's allocated memory.
*) Bugfix: if nginx was built with ngx_http_perl_module, the perl
before 5.8.6 was used, and perl supported threads, then during
reconfiguration the master process aborted; bug appeared in
0.5.9.
Thanks to Boris Zhmurov.
*) Bugfix: the ngx_http_perl_module methods may get invalid values of
the regex captures.
*) Bugfix: a segmentation fault occurred in worker process, if the
$r->has_request_body() method was called for a request whose small
request body was already received.
*) Bugfix: large_client_header_buffers did not freed before going to
keep-alive state.
Thanks to Olexander Shtepa.
*) Bugfix: the last address was missed in the $upstream_addr variable;
bug appeared in 0.6.18.
*) Bugfix: the "fastcgi_catch_stderr" directive did return error code;
now it returns 502 code, that can be rerouted to a next server using
the "fastcgi_next_upstream invalid_header" directive.
*) Bugfix: a segmentation fault occurred in master process if the
"fastcgi_catch_stderr" directive was used; bug appeared in
0.6.10.
Thanks to Manlio Perillo.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 19 Dec 2007 00:00:00 +0300 |
parents | 9fc4ab6673f9 |
children | 820f6378fc00 |
line wrap: on
line diff
--- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -428,13 +428,9 @@ ngx_event_module_init(ngx_cycle_t *cycle void ***cf; u_char *shared; size_t size, cl; - ngx_event_conf_t *ecf; + ngx_shm_t shm; ngx_core_conf_t *ccf; - ngx_shm_t shm; -#if !(NGX_WIN32) - ngx_int_t limit; - struct rlimit rlmt; -#endif + ngx_event_conf_t *ecf; cf = ngx_get_conf(cycle->conf_ctx, ngx_events_module); @@ -456,6 +452,9 @@ ngx_event_module_init(ngx_cycle_t *cycle ngx_timer_resolution = ccf->timer_resolution; #if !(NGX_WIN32) + { + ngx_int_t limit; + struct rlimit rlmt; if (getrlimit(RLIMIT_NOFILE, &rlmt) == -1) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, @@ -475,7 +474,7 @@ ngx_event_module_init(ngx_cycle_t *cycle ecf->connections, limit); } } - + } #endif /* !(NGX_WIN32) */ @@ -573,13 +572,6 @@ ngx_event_process_init(ngx_cycle_t *cycl ngx_core_conf_t *ccf; ngx_event_conf_t *ecf; ngx_event_module_t *module; -#if (NGX_WIN32) - ngx_iocp_conf_t *iocpcf; -#else - struct rlimit rlmt; - struct sigaction sa; - struct itimerval itv; -#endif ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); ecf = ngx_event_get_conf(cycle->conf_ctx, ngx_event_core_module); @@ -625,6 +617,8 @@ ngx_event_process_init(ngx_cycle_t *cycl #if !(NGX_WIN32) if (ngx_timer_resolution && !(ngx_event_flags & NGX_USE_TIMER_EVENT)) { + struct sigaction sa; + struct itimerval itv; ngx_memzero(&sa, sizeof(struct sigaction)); sa.sa_handler = ngx_timer_signal_handler; @@ -648,6 +642,7 @@ ngx_event_process_init(ngx_cycle_t *cycl } if (ngx_event_flags & NGX_USE_FD_EVENT) { + struct rlimit rlmt; if (getrlimit(RLIMIT_NOFILE, &rlmt) == -1) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, @@ -774,6 +769,8 @@ ngx_event_process_init(ngx_cycle_t *cycl #if (NGX_WIN32) if (ngx_event_flags & NGX_USE_IOCP_EVENT) { + ngx_iocp_conf_t *iocpcf; + rev->handler = ngx_event_acceptex; if (ngx_add_event(rev, 0, NGX_IOCP_ACCEPT) == NGX_ERROR) {