comparison src/core/nginx.c @ 4360:7447784028a7 stable-1.0

Merge of r4284: Introduction of simple ngx_write_stderr() instead of ngx_log_stderr() for output of ./configure options, etc., since ngx_log_stderr() output length is limited by 2048 characters defined as NGX_MAX_ERROR_STR.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 14 Dec 2011 15:23:23 +0000
parents 413b822f1efa
children 6bfae7032017
comparison
equal deleted inserted replaced
4359:a1bb976ec16a 4360:7447784028a7
214 if (ngx_get_options(argc, argv) != NGX_OK) { 214 if (ngx_get_options(argc, argv) != NGX_OK) {
215 return 1; 215 return 1;
216 } 216 }
217 217
218 if (ngx_show_version) { 218 if (ngx_show_version) {
219 ngx_log_stderr(0, "nginx version: " NGINX_VER); 219 ngx_write_stderr("nginx version: " NGINX_VER NGX_LINEFEED);
220 220
221 if (ngx_show_help) { 221 if (ngx_show_help) {
222 ngx_log_stderr(0, 222 ngx_write_stderr(
223 "Usage: nginx [-?hvVtq] [-s signal] [-c filename] " 223 "Usage: nginx [-?hvVtq] [-s signal] [-c filename] "
224 "[-p prefix] [-g directives]" CRLF CRLF 224 "[-p prefix] [-g directives]" NGX_LINEFEED
225 "Options:" CRLF 225 NGX_LINEFEED
226 " -?,-h : this help" CRLF 226 "Options:" NGX_LINEFEED
227 " -v : show version and exit" CRLF 227 " -?,-h : this help" NGX_LINEFEED
228 " -v : show version and exit" NGX_LINEFEED
228 " -V : show version and configure options then exit" 229 " -V : show version and configure options then exit"
229 CRLF 230 NGX_LINEFEED
230 " -t : test configuration and exit" CRLF 231 " -t : test configuration and exit" NGX_LINEFEED
231 " -q : suppress non-error messages " 232 " -q : suppress non-error messages "
232 "during configuration testing" CRLF 233 "during configuration testing" NGX_LINEFEED
233 " -s signal : send signal to a master process: " 234 " -s signal : send signal to a master process: "
234 "stop, quit, reopen, reload" CRLF 235 "stop, quit, reopen, reload" NGX_LINEFEED
235 #ifdef NGX_PREFIX 236 #ifdef NGX_PREFIX
236 " -p prefix : set prefix path (default: " 237 " -p prefix : set prefix path (default: "
237 NGX_PREFIX ")" CRLF 238 NGX_PREFIX ")" NGX_LINEFEED
238 #else 239 #else
239 " -p prefix : set prefix path (default: NONE)" CRLF 240 " -p prefix : set prefix path (default: NONE)" NGX_LINEFEED
240 #endif 241 #endif
241 " -c filename : set configuration file (default: " 242 " -c filename : set configuration file (default: "
242 NGX_CONF_PATH ")" CRLF 243 NGX_CONF_PATH ")" NGX_LINEFEED
243 " -g directives : set global directives out of configuration " 244 " -g directives : set global directives out of configuration "
244 "file" CRLF 245 "file" NGX_LINEFEED NGX_LINEFEED
245 ); 246 );
246 } 247 }
247 248
248 if (ngx_show_configure) { 249 if (ngx_show_configure) {
250 ngx_write_stderr(
249 #ifdef NGX_COMPILER 251 #ifdef NGX_COMPILER
250 ngx_log_stderr(0, "built by " NGX_COMPILER); 252 "built by " NGX_COMPILER NGX_LINEFEED
251 #endif 253 #endif
252 #if (NGX_SSL) 254 #if (NGX_SSL)
253 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME 255 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
254 ngx_log_stderr(0, "TLS SNI support enabled"); 256 "TLS SNI support enabled" NGX_LINEFEED
255 #else 257 #else
256 ngx_log_stderr(0, "TLS SNI support disabled"); 258 "TLS SNI support disabled" NGX_LINEFEED
257 #endif 259 #endif
258 #endif 260 #endif
259 ngx_log_stderr(0, "configure arguments:" NGX_CONFIGURE); 261 "configure arguments:" NGX_CONFIGURE NGX_LINEFEED);
260 } 262 }
261 263
262 if (!ngx_test_config) { 264 if (!ngx_test_config) {
263 return 0; 265 return 0;
264 } 266 }