Klaus Demo nginx / 2cb30f1
the -q switch Igor Sysoev 9 years ago
3 changed file(s) with 15 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
211211
212212 if (ngx_show_help) {
213213 ngx_log_stderr(0,
214 "Usage: nginx [-?hvVt] [-s signal] [-c filename] "
214 "Usage: nginx [-?hvVtq] [-s signal] [-c filename] "
215215 "[-p prefix] [-g directives]" CRLF CRLF
216216 "Options:" CRLF
217217 " -?,-h : this help" CRLF
219219 " -V : show version and configure options then exit"
220220 CRLF
221221 " -t : test configuration and exit" CRLF
222 " -q : suppress non-error messages "
223 "during configuration testing" CRLF
222224 " -s signal : send signal to a master process: "
223225 "stop, quit, reopen, reload" CRLF
224226 #ifdef NGX_PREFIX
331333 }
332334
333335 if (ngx_test_config) {
334 ngx_log_stderr(0, "configuration file %s test is successful",
335 cycle->conf_file.data);
336 if (!ngx_quiet_mode) {
337 ngx_log_stderr(0, "configuration file %s test is successful",
338 cycle->conf_file.data);
339 }
340
336341 return 0;
337342 }
338343
684689 ngx_test_config = 1;
685690 break;
686691
692 case 'q':
693 ngx_quiet_mode = 1;
694 break;
695
687696 case 'p':
688697 if (*p) {
689698 ngx_prefix = p;
2323 static ngx_event_t ngx_cleaner_event;
2424
2525 ngx_uint_t ngx_test_config;
26 ngx_uint_t ngx_quiet_mode;
2627
2728 #if (NGX_THREADS)
2829 ngx_tls_key_t ngx_core_tls_key;
265266 return NULL;
266267 }
267268
268 if (ngx_test_config) {
269 if (ngx_test_config && !ngx_quiet_mode) {
269270 ngx_log_stderr(0, "the configuration file %s syntax is ok",
270271 cycle->conf_file.data);
271272 }
129129 extern ngx_array_t ngx_old_cycles;
130130 extern ngx_module_t ngx_core_module;
131131 extern ngx_uint_t ngx_test_config;
132 extern ngx_uint_t ngx_quiet_mode;
132133 #if (NGX_THREADS)
133134 extern ngx_tls_key_t ngx_core_tls_key;
134135 #endif