[nginx] Core: improved logging on invalid NGINX variable (ticket...

Maxim Dounin mdounin at mdounin.ru
Mon Feb 15 14:42:49 UTC 2016


details:   http://hg.nginx.org/nginx/rev/50fb3fd79f76
branches:  
changeset: 6399:50fb3fd79f76
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Mon Feb 15 17:41:52 2016 +0300
description:
Core: improved logging on invalid NGINX variable (ticket #900).

diffstat:

 src/core/nginx.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff --git a/src/core/nginx.c b/src/core/nginx.c
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -481,6 +481,12 @@ ngx_add_inherited_sockets(ngx_cycle_t *c
         }
     }
 
+    if (v != p) {
+        ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
+                      "invalid socket number \"%s\" in " NGINX_VAR
+                      " environment variable, ignoring", v);
+    }
+
     ngx_inherited = 1;
 
     return ngx_set_inherited_sockets(cycle);



More information about the nginx-devel mailing list