Welcome! Log In Create A New Profile

Advanced

Re: [Patch] add -h to nginx

All files from this thread

File Name File Size   Posted by Date  
nginx-help.patch 1.3 KB open | download Jérôme Loyet 03/24/2009 Read message
nginx-help.patch 1.3 KB open | download Jérôme Loyet 03/24/2009 Read message
nginx-help.patch 1.4 KB open | download Jérôme Loyet 03/24/2009 Read message
Jérôme Loyet
March 24, 2009 09:52AM
Le 24 mars 2009 14:15, Jérôme Loyet <jerome@loyet.net> a écrit :
> Hello,
>
> I attach a small patch which add the -h argument to nginx. As common
> programs, this arg show the available options.
>
> [root@wp0men04s /LIBRE/nginx/nginx-0.7.44]# ./objs/nginx -h
> Usage: nginx [-h] [-v] [-V] [-t] [-c filename] [-g param] [-d basedir]
>
> Options:
> -h : list available command line options (this page)
> -v : show version then exit
> -V : show version and configure options then exit
> -c filename : set conf file (default: /usr/local/nginx/conf/nginx.conf)
> -g param : set conf directive out of conf file
>
> nginx version: nginx/0.7.44
>
> Don't know if you're interested in such a patch. But the first time I
> tried nginx I was kind of lost on where to find available options.
>
> And I ask myself a question, why use those lines:
> p = "nginx version: " NGINX_VER CRLF;
> n = sizeof("nginx version: " NGINX_VER CRLF) - 1;
>
> if (ngx_write_fd(ngx_stderr_fileno, p, n) != n) {
> return 1;
> }
>
> instead of
>
> p = "nginx version: " NGINX_VER CRLF;
>
> if (ngx_write_fd(ngx_stderr_fileno, p, strlen(p)) != n) {
> return 1;
> }
>

Sorry I sent the wrong version of the patch. The right version is attached.
And in my previous question I meant:

instead of

p = "nginx version: " NGINX_VER CRLF;
n = strlen(p);

if (ngx_write_fd(ngx_stderr_fileno, p, n) != n) {
return 1;
}
Attachments:
open | download - nginx-help.patch (1.3 KB)
Subject Author Posted

[Patch] add -h to nginx Attachments

Jérôme Loyet March 24, 2009 09:47AM

Re: [Patch] add -h to nginx Attachments

Jérôme Loyet March 24, 2009 09:52AM

Re: [Patch] add -h to nginx

Juan Fco. Giordana March 24, 2009 10:27AM

Re: [Patch] add -h to nginx Attachments

Jérôme Loyet March 24, 2009 11:36AM

Re: [Patch] add -h to nginx

Igor Sysoev March 25, 2009 06:19AM

Re: [Patch] add -h to nginx

Igor Sysoev March 25, 2009 06:23AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 140
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready