aboutsummaryrefslogtreecommitdiff
path: root/nginx/ngx_http_js_module.c
diff options
context:
space:
mode:
authorDmitry Volyntsev <xeioex@nginx.com>2019-06-18 17:57:38 +0300
committerDmitry Volyntsev <xeioex@nginx.com>2019-06-18 17:57:38 +0300
commitdb34b1921fce3a101570cf0e33cf5a3a6725fee6 (patch)
treeb4dcd46241d6038e75b3ac8755e6e04c65c6daeb /nginx/ngx_http_js_module.c
parent8878c6b6694a2f15d45a605999b6d7667e688c22 (diff)
downloadnjs-db34b1921fce3a101570cf0e33cf5a3a6725fee6.tar.gz
njs-db34b1921fce3a101570cf0e33cf5a3a6725fee6.zip
Added process global object.
process object properties: argv - an array containing the command line arguments env - an object containing the user environment pid - process PID ppid - process parent PID This closes #84 issue on Github.
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r--nginx/ngx_http_js_module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c
index cd8a8f95..787098a0 100644
--- a/nginx/ngx_http_js_module.c
+++ b/nginx/ngx_http_js_module.c
@@ -2283,6 +2283,8 @@ ngx_http_js_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
options.backtrace = 1;
options.ops = &ngx_http_js_ops;
+ options.argv = ngx_argv;
+ options.argc = ngx_argc;
file = value[1];
options.file.start = file.data;