Mercurial > hg > nginx
diff src/os/unix/ngx_process_cycle.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 | 8e8f3af115b5 |
children | c52408583801 |
line wrap: on
line diff
--- a/src/os/unix/ngx_process_cycle.c Mon Dec 06 14:45:08 2004 +0000 +++ b/src/os/unix/ngx_process_cycle.c Tue Dec 21 12:30:30 2004 +0000 @@ -35,6 +35,7 @@ sig_atomic_t ngx_sigio; sig_atomic_t ngx_terminate; sig_atomic_t ngx_quit; +sig_atomic_t ngx_debug_quit; ngx_uint_t ngx_exiting; sig_atomic_t ngx_reconfigure; sig_atomic_t ngx_reopen; @@ -194,8 +195,6 @@ ngx_reconfigure = 0; if (ngx_new_binary) { - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "start new workers"); - ngx_start_worker_processes(cycle, ccf->worker_processes, NGX_PROCESS_RESPAWN); ngx_start_garbage_collector(cycle, NGX_PROCESS_RESPAWN); @@ -204,7 +203,7 @@ continue; } - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reconfiguring"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reconfiguring"); cycle = ngx_init_cycle(cycle); if (cycle == NULL) { @@ -233,7 +232,7 @@ if (ngx_reopen) { ngx_reopen = 0; - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopening logs"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs"); ngx_reopen_files(cycle, ccf->user); ngx_signal_worker_processes(cycle, ngx_signal_value(NGX_REOPEN_SIGNAL)); @@ -241,7 +240,7 @@ if (ngx_change_binary) { ngx_change_binary = 0; - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "changing binary"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "changing binary"); ngx_new_binary = ngx_exec_new_binary(cycle, ngx_argv); } @@ -281,7 +280,7 @@ if (ngx_reconfigure) { ngx_reconfigure = 0; - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reconfiguring"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reconfiguring"); cycle = ngx_init_cycle(cycle); if (cycle == NULL) { @@ -294,7 +293,7 @@ if (ngx_reopen) { ngx_reopen = 0; - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopening logs"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs"); ngx_reopen_files(cycle, (ngx_uid_t) -1); } } @@ -308,7 +307,7 @@ ngx_channel_t ch; struct itimerval itv; - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "start worker processes"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "start worker processes"); ch.command = NGX_CMD_OPEN_CHANNEL; @@ -367,7 +366,7 @@ return; - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "start garbage collector"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "start garbage collector"); ch.command = NGX_CMD_OPEN_CHANNEL; @@ -624,7 +623,7 @@ { ngx_delete_pidfile(cycle); - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exit"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exit"); ngx_destroy_pool(cycle->pool); @@ -690,7 +689,7 @@ if (ngx_exiting && ngx_event_timer_rbtree == &ngx_event_timer_sentinel) { - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting"); #if (NGX_THREADS) @@ -699,6 +698,10 @@ ngx_wakeup_worker_threads(cycle); #endif + if (ngx_debug_quit) { + ngx_debug_point(); + } + /* * we do not destroy cycle->pool here because a signal handler * that uses cycle->log can be called at this point @@ -711,7 +714,7 @@ ngx_process_events(cycle); if (ngx_terminate) { - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting"); #if (NGX_THREADS) ngx_wakeup_worker_threads(cycle); @@ -726,7 +729,7 @@ if (ngx_quit) { ngx_quit = 0; - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "gracefully shutting down"); ngx_setproctitle("worker process is shutting down"); @@ -738,7 +741,7 @@ if (ngx_reopen) { ngx_reopen = 0; - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopen logs"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs"); ngx_reopen_files(cycle, -1); } } @@ -1096,13 +1099,13 @@ for ( ;; ) { if (ngx_terminate || ngx_quit) { - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting"); exit(0); } if (ngx_reopen) { ngx_reopen = 0; - ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopen logs"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs"); ngx_reopen_files(cycle, -1); }