Mercurial > hg > nginx-quic
comparison src/core/nginx.c @ 2735:a9d7f8ebdbef
add -? and -h options
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 21 Apr 2009 16:21:58 +0000 |
parents | edc01cc34b3e |
children | ae81441e23f4 |
comparison
equal
deleted
inserted
replaced
2734:37580bd13ca5 | 2735:a9d7f8ebdbef |
---|---|
181 }; | 181 }; |
182 | 182 |
183 | 183 |
184 ngx_uint_t ngx_max_module; | 184 ngx_uint_t ngx_max_module; |
185 | 185 |
186 static ngx_uint_t ngx_show_help; | |
186 static ngx_uint_t ngx_show_version; | 187 static ngx_uint_t ngx_show_version; |
187 static ngx_uint_t ngx_show_configure; | 188 static ngx_uint_t ngx_show_configure; |
188 static u_char *ngx_conf_file; | 189 static u_char *ngx_conf_file; |
189 static u_char *ngx_conf_params; | 190 static u_char *ngx_conf_params; |
190 #if (NGX_WIN32) | 191 #if (NGX_WIN32) |
207 return 1; | 208 return 1; |
208 } | 209 } |
209 | 210 |
210 if (ngx_show_version) { | 211 if (ngx_show_version) { |
211 ngx_log_stderr("nginx version: " NGINX_VER); | 212 ngx_log_stderr("nginx version: " NGINX_VER); |
213 | |
214 if (ngx_show_help) { | |
215 ngx_log_stderr( | |
216 "Usage: nginx [-?hvVt]" | |
217 #if (NGX_WIN32) | |
218 " [-s signal]" | |
219 #endif | |
220 " [-c filename] [-g directives]" CRLF CRLF | |
221 "Options:" CRLF | |
222 " -?,-h : this help" CRLF | |
223 " -v : show version and exit" CRLF | |
224 " -V : show version and configure options then exit" | |
225 CRLF | |
226 " -t : test configuration and exit" CRLF | |
227 #if (NGX_WIN32) | |
228 " -s signal : send signal to a master process" CRLF | |
229 #endif | |
230 " -c filename : set configuration file (default: " | |
231 NGX_CONF_PATH ")" CRLF | |
232 " -g directives : set global directives out of configuration " | |
233 "file" CRLF | |
234 ); | |
235 } | |
212 | 236 |
213 if (ngx_show_configure) { | 237 if (ngx_show_configure) { |
214 #ifdef NGX_COMPILER | 238 #ifdef NGX_COMPILER |
215 ngx_log_stderr("built by " NGX_COMPILER); | 239 ngx_log_stderr("built by " NGX_COMPILER); |
216 #endif | 240 #endif |
612 | 636 |
613 while (*p) { | 637 while (*p) { |
614 | 638 |
615 switch (*p++) { | 639 switch (*p++) { |
616 | 640 |
641 case '?': | |
642 case 'h': | |
643 ngx_show_version = 1; | |
644 ngx_show_help = 1; | |
645 break; | |
646 | |
617 case 'v': | 647 case 'v': |
618 ngx_show_version = 1; | 648 ngx_show_version = 1; |
619 break; | 649 break; |
620 | 650 |
621 case 'V': | 651 case 'V': |