Mercurial > hg > nginx-mail
diff src/core/nginx.c @ 188:af37b7cb6698 NGINX_0_3_41
nginx 0.3.41
*) 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 <http://sysoev.ru> |
---|---|
date | Fri, 21 Apr 2006 00:00:00 +0400 |
parents | 13710a1813ad |
children | 3689cd4e3228 |
line wrap: on
line diff
--- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -175,7 +175,9 @@ ngx_module_t ngx_core_module = { 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 @@ main(int argc, char *const *argv) 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 @@ ngx_getopt(ngx_cycle_t *cycle, int argc, switch (argv[i][1]) { + case 'v': + ngx_show_version = 1; + break; + case 't': ngx_test_config = 1; break;