comparison src/os/unix/ngx_process_cycle.c @ 500:ed3d382670c7 NGINX_0_7_62

nginx 0.7.62 *) Security: a segmentation fault might occur in worker process while specially crafted request handling. Thanks to Chris Ries. *) Feature: the $upstream_cache_status variable. *) Bugfix: an expired cached response might stick in the "UPDATING" state. *) Bugfix: a segmentation fault might occur in worker process, if error_log was set to info or debug level. Thanks to Sergey Bochenkov. *) Bugfix: in handling FastCGI headers split in records. *) Bugfix: XSLT filter may fail with message "not well formed XML document" for valid XML document. Thanks to Kuramoto Eiji. *) Bugfix: now in MacOSX, Cygwin, and nginx/Windows locations given by a regular expression are always tested in case insensitive mode. *) Bugfix: now nginx/Windows ignores trailing dots in URI. Thanks to Hugo Leisink. *) Bugfix: name of file specified in --conf-path was not honored during installation; the bug had appeared in 0.6.6. Thanks to Maxim Dounin. *) Bugfix: a 500 error code was returned for invalid login/password while HTTP Basic authentication on Windows.
author Igor Sysoev <http://sysoev.ru>
date Mon, 14 Sep 2009 00:00:00 +0400
parents 56baf312c1b5
children 89dc5654117c
comparison
equal deleted inserted replaced
499:f2c782e5161f 500:ed3d382670c7
32 ngx_pid_t ngx_pid; 32 ngx_pid_t ngx_pid;
33 ngx_uint_t ngx_threaded; 33 ngx_uint_t ngx_threaded;
34 34
35 sig_atomic_t ngx_reap; 35 sig_atomic_t ngx_reap;
36 sig_atomic_t ngx_sigio; 36 sig_atomic_t ngx_sigio;
37 sig_atomic_t ngx_sigalrm;
37 sig_atomic_t ngx_terminate; 38 sig_atomic_t ngx_terminate;
38 sig_atomic_t ngx_quit; 39 sig_atomic_t ngx_quit;
39 sig_atomic_t ngx_debug_quit; 40 sig_atomic_t ngx_debug_quit;
40 ngx_uint_t ngx_exiting; 41 ngx_uint_t ngx_exiting;
41 sig_atomic_t ngx_reconfigure; 42 sig_atomic_t ngx_reconfigure;
128 delay = 0; 129 delay = 0;
129 live = 1; 130 live = 1;
130 131
131 for ( ;; ) { 132 for ( ;; ) {
132 if (delay) { 133 if (delay) {
133 delay *= 2; 134 if (ngx_sigalrm) {
135 delay *= 2;
136 ngx_sigalrm = 0;
137 }
134 138
135 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, 139 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
136 "temination cycle: %d", delay); 140 "termination cycle: %d", delay);
137 141
138 itv.it_interval.tv_sec = 0; 142 itv.it_interval.tv_sec = 0;
139 itv.it_interval.tv_usec = 0; 143 itv.it_interval.tv_usec = 0;
140 itv.it_value.tv_sec = delay / 1000; 144 itv.it_value.tv_sec = delay / 1000;
141 itv.it_value.tv_usec = (delay % 1000 ) * 1000; 145 itv.it_value.tv_usec = (delay % 1000 ) * 1000;
490 "kill (%P, %d)" , ngx_processes[i].pid, signo); 494 "kill (%P, %d)" , ngx_processes[i].pid, signo);
491 495
492 if (kill(ngx_processes[i].pid, signo) == -1) { 496 if (kill(ngx_processes[i].pid, signo) == -1) {
493 err = ngx_errno; 497 err = ngx_errno;
494 ngx_log_error(NGX_LOG_ALERT, cycle->log, err, 498 ngx_log_error(NGX_LOG_ALERT, cycle->log, err,
495 "kill(%P, %d) failed", 499 "kill(%P, %d) failed", ngx_processes[i].pid, signo);
496 ngx_processes[i].pid, signo);
497 500
498 if (err == NGX_ESRCH) { 501 if (err == NGX_ESRCH) {
499 ngx_processes[i].exited = 1; 502 ngx_processes[i].exited = 1;
500 ngx_processes[i].exiting = 0; 503 ngx_processes[i].exiting = 0;
501 ngx_reap = 1; 504 ngx_reap = 1;