Mercurial > hg > nginx
comparison src/core/nginx.c @ 3750:ffbdaa3c70d6
the -q switch
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 02 Sep 2010 13:43:02 +0000 |
parents | dd1570b6f237 |
children | 89002ac695e5 |
comparison
equal
deleted
inserted
replaced
3749:3ee39f593642 | 3750:ffbdaa3c70d6 |
---|---|
210 if (ngx_show_version) { | 210 if (ngx_show_version) { |
211 ngx_log_stderr(0, "nginx version: " NGINX_VER); | 211 ngx_log_stderr(0, "nginx version: " NGINX_VER); |
212 | 212 |
213 if (ngx_show_help) { | 213 if (ngx_show_help) { |
214 ngx_log_stderr(0, | 214 ngx_log_stderr(0, |
215 "Usage: nginx [-?hvVt] [-s signal] [-c filename] " | 215 "Usage: nginx [-?hvVtq] [-s signal] [-c filename] " |
216 "[-p prefix] [-g directives]" CRLF CRLF | 216 "[-p prefix] [-g directives]" CRLF CRLF |
217 "Options:" CRLF | 217 "Options:" CRLF |
218 " -?,-h : this help" CRLF | 218 " -?,-h : this help" CRLF |
219 " -v : show version and exit" CRLF | 219 " -v : show version and exit" CRLF |
220 " -V : show version and configure options then exit" | 220 " -V : show version and configure options then exit" |
221 CRLF | 221 CRLF |
222 " -t : test configuration and exit" CRLF | 222 " -t : test configuration and exit" CRLF |
223 " -q : suppress non-error messages " | |
224 "during configuration testing" CRLF | |
223 " -s signal : send signal to a master process: " | 225 " -s signal : send signal to a master process: " |
224 "stop, quit, reopen, reload" CRLF | 226 "stop, quit, reopen, reload" CRLF |
225 #ifdef NGX_PREFIX | 227 #ifdef NGX_PREFIX |
226 " -p prefix : set prefix path (default: " | 228 " -p prefix : set prefix path (default: " |
227 NGX_PREFIX ")" CRLF | 229 NGX_PREFIX ")" CRLF |
330 | 332 |
331 return 1; | 333 return 1; |
332 } | 334 } |
333 | 335 |
334 if (ngx_test_config) { | 336 if (ngx_test_config) { |
335 ngx_log_stderr(0, "configuration file %s test is successful", | 337 if (!ngx_quiet_mode) { |
336 cycle->conf_file.data); | 338 ngx_log_stderr(0, "configuration file %s test is successful", |
339 cycle->conf_file.data); | |
340 } | |
341 | |
337 return 0; | 342 return 0; |
338 } | 343 } |
339 | 344 |
340 if (ngx_signal) { | 345 if (ngx_signal) { |
341 return ngx_signal_process(cycle, ngx_signal); | 346 return ngx_signal_process(cycle, ngx_signal); |
683 | 688 |
684 case 't': | 689 case 't': |
685 ngx_test_config = 1; | 690 ngx_test_config = 1; |
686 break; | 691 break; |
687 | 692 |
693 case 'q': | |
694 ngx_quiet_mode = 1; | |
695 break; | |
696 | |
688 case 'p': | 697 case 'p': |
689 if (*p) { | 698 if (*p) { |
690 ngx_prefix = p; | 699 ngx_prefix = p; |
691 goto next; | 700 goto next; |
692 } | 701 } |