Mercurial > hg > nginx
diff src/core/nginx.c @ 639:715d24327080 release-0.3.41
nginx-0.3.41-RELEASE import
*) Feature: the -v switch.
*) Bugfix: the segmentation fault may occurred if the SSI page has
remote subrequests.
*) Bugfix: in FastCGI handling.
*) Bugfix: if the perl modules path was not set using
--with-perl_modules_path=PATH or the "perl_modules", then the
segmentation fault was occurred.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 21 Apr 2006 12:06:44 +0000 |
parents | f971949ffb58 |
children | 5e8fb59c18c1 |
line wrap: on
line diff
--- a/src/core/nginx.c Wed Apr 19 15:30:56 2006 +0000 +++ b/src/core/nginx.c Fri Apr 21 12:06:44 2006 +0000 @@ -175,7 +175,9 @@ ngx_uint_t ngx_max_module; -static char *ngx_null_environ = NULL; +static ngx_uint_t ngx_show_version; + +static char *ngx_null_environ = NULL; int ngx_cdecl @@ -229,6 +231,17 @@ return 1; } + if (ngx_show_version) { + ngx_write_fd(ngx_stderr_fileno, "nginx version: " NGINX_VER CRLF, + sizeof("nginx version: " NGINX_VER CRLF) - 1); + +#ifdef NGX_COMPILER + ngx_write_fd(ngx_stderr_fileno, "built by " NGX_COMPILER CRLF, + sizeof("built by " NGX_COMPILER CRLF) - 1); +#endif + return 0; + } + if (ngx_test_config) { log->log_level = NGX_LOG_INFO; } @@ -472,6 +485,10 @@ switch (argv[i][1]) { + case 'v': + ngx_show_version = 1; + break; + case 't': ngx_test_config = 1; break;