comparison src/os/unix/ngx_process.c @ 477:ad1e9ebf93bb release-0.1.13

nginx-0.1.13-RELEASE import *) Feature: the server_names_hash and server_names_hash_threshold directives. *) Bugfix: the *.domain.tld names in the "server_name" directive did not work. *) Bugfix: the %request_length log parameter logged the incorrect length.
author Igor Sysoev <igor@sysoev.ru>
date Tue, 21 Dec 2004 12:30:30 +0000
parents a88a3e4e158f
children d4ea69372b94
comparison
equal deleted inserted replaced
476:7e8b84ab09e9 477:ad1e9ebf93bb
140 140
141 default: 141 default:
142 break; 142 break;
143 } 143 }
144 144
145 ngx_log_debug2(NGX_LOG_DEBUG_CORE, cycle->log, 0, 145 ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "start %s %P", name, pid);
146 "spawn %s: %P", name, pid);
147 146
148 ngx_processes[s].pid = pid; 147 ngx_processes[s].pid = pid;
149 ngx_processes[s].exited = 0; 148 ngx_processes[s].exited = 0;
150 149
151 if (respawn >= 0) { 150 if (respawn >= 0) {
214 ngx_pid_t pid; 213 ngx_pid_t pid;
215 ngx_err_t err; 214 ngx_err_t err;
216 ngx_int_t i; 215 ngx_int_t i;
217 ngx_uint_t one; 216 ngx_uint_t one;
218 struct timeval tv; 217 struct timeval tv;
218
219 one = 0; 219 one = 0;
220 220
221 for ( ;; ) { 221 for ( ;; ) {
222 pid = waitpid(-1, &status, WNOHANG); 222 pid = waitpid(-1, &status, WNOHANG);
223 223
285 "%s %P exited on signal %d%s", 285 "%s %P exited on signal %d%s",
286 process, pid, WTERMSIG(status), 286 process, pid, WTERMSIG(status),
287 WCOREDUMP(status) ? " (core dumped)" : ""); 287 WCOREDUMP(status) ? " (core dumped)" : "");
288 288
289 } else { 289 } else {
290 ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0, 290 ngx_log_error(NGX_LOG_NOTICE, ngx_cycle->log, 0,
291 "%s %P exited with code %d", 291 "%s %P exited with code %d",
292 process, pid, WEXITSTATUS(status)); 292 process, pid, WEXITSTATUS(status));
293 } 293 }
294 294
295 if (WEXITSTATUS(status) == 2 && ngx_processes[i].respawn) { 295 if (WEXITSTATUS(status) == 2 && ngx_processes[i].respawn) {