comparison src/os/unix/ngx_process_cycle.c @ 80:6ae11d59d10e NGINX_0_1_40

nginx 0.1.40 *) Bugfix: if a client sent too long header line, then the request information did not logged in the error log. *) Bugfix: the "Set-Cookie" header line was not transferred when the "X-Accel-Redirect" was used; bug appeared in 0.1.39. *) Bugfix: the "Content-Disposition" header line was not transferred when the "X-Accel-Redirect" was used. *) Bugfix: the master process did not close the listen socket on the SIGQUIT signal. *) Bugfix: after on-line upgrade on Linux and Solaris the process name became shorter in the "ps" command.
author Igor Sysoev <http://sysoev.ru>
date Fri, 22 Jul 2005 00:00:00 +0400
parents b31656313b59
children 991c6e4c7654
comparison
equal deleted inserted replaced
79:b7cf468d0667 80:6ae11d59d10e
5 5
6 6
7 #include <ngx_config.h> 7 #include <ngx_config.h>
8 #include <ngx_core.h> 8 #include <ngx_core.h>
9 #include <ngx_event.h> 9 #include <ngx_event.h>
10 #include <ngx_setproctitle.h>
11 #include <ngx_channel.h> 10 #include <ngx_channel.h>
12 11
13 12
14 static void ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t n, 13 static void ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t n,
15 ngx_int_t type); 14 ngx_int_t type);
67 { 66 {
68 char *title; 67 char *title;
69 u_char *p; 68 u_char *p;
70 size_t size; 69 size_t size;
71 ngx_int_t i; 70 ngx_int_t i;
71 ngx_uint_t n;
72 sigset_t set; 72 sigset_t set;
73 struct timeval tv; 73 struct timeval tv;
74 struct itimerval itv; 74 struct itimerval itv;
75 ngx_uint_t live; 75 ngx_uint_t live;
76 ngx_msec_t delay; 76 ngx_msec_t delay;
77 ngx_listening_t *ls;
77 ngx_core_conf_t *ccf; 78 ngx_core_conf_t *ccf;
78 79
79 sigemptyset(&set); 80 sigemptyset(&set);
80 sigaddset(&set, SIGCHLD); 81 sigaddset(&set, SIGCHLD);
81 sigaddset(&set, SIGALRM); 82 sigaddset(&set, SIGALRM);
177 } 178 }
178 179
179 if (ngx_quit) { 180 if (ngx_quit) {
180 ngx_signal_worker_processes(cycle, 181 ngx_signal_worker_processes(cycle,
181 ngx_signal_value(NGX_SHUTDOWN_SIGNAL)); 182 ngx_signal_value(NGX_SHUTDOWN_SIGNAL));
183
184 ls = cycle->listening.elts;
185 for (n = 0; n < cycle->listening.nelts; n++) {
186 if (ngx_close_socket(ls[n].fd) == -1) {
187 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
188 ngx_close_socket_n " %V failed",
189 &ls[n].addr_text);
190 }
191 }
192 cycle->listening.nelts = 0;
193
182 continue; 194 continue;
183 } 195 }
184 196
185 if (ngx_timer) { 197 if (ngx_timer) {
186 ngx_timer = 0; 198 ngx_timer = 0;