[PATCH] -h output note addition: Testing of configuration can lead to a correction of path/file permissions

Maxim Dounin mdounin at mdounin.ru
Wed Jan 10 16:39:19 UTC 2018


Hello!

On Wed, Jan 10, 2018 at 04:09:11PM +0100, Jörg Kost wrote:

> # HG changeset patch
> # User Joerg Kost <jk at ip-clear.de>
> # Date 1515599827 -3600
> #      Wed Jan 10 16:57:07 2018 +0100
> # Node ID 9132d6facd3ddbc9c50543a96686374b6e058f10
> # Parent  6d2e92acb013224e6ef2c71c9e61ab07f0b03271
> Modified cli help output to make it clear that nginx
> may modify permissions and inode owners on test runs.
> 
> diff -r 6d2e92acb013 -r 9132d6facd3d src/core/nginx.c
> --- a/src/core/nginx.c	Thu Dec 28 12:01:05 2017 +0200
> +++ b/src/core/nginx.c	Wed Jan 10 16:57:07 2018 +0100
> @@ -401,8 +401,8 @@
>               "  -v            : show version and exit" NGX_LINEFEED
>               "  -V            : show version and configure options then 
> exit"
>                                  NGX_LINEFEED
> -            "  -t            : test configuration and exit" 
> NGX_LINEFEED
> -            "  -T            : test configuration, dump it and exit"
> +            "  -t            : test & open configuration, correct path 
> permissions & exit" NGX_LINEFEED
> +            "  -T            : same as -t, but additionally dump to 
> stdout and exit"
>                                  NGX_LINEFEED
>               "  -q            : suppress non-error messages "
>                                  "during configuration testing" 
> NGX_LINEFEED

I don't think this belongs to the "nginx -h" output.  The "nginx 
-h" purpose is to provide short and readable description on what 
each option does, and "test configuration and exit" is a good 
enough description.

What "test configuration" implies and which side-effects it may 
have is a completely different question, and trying to answer it 
here will certainly hurt readability.  Also note that the 
description you've suggested is certainly incomplete - for 
example, testing configuration also creates various files and 
directories.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx-devel mailing list