File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,8 @@ API Implemented
161161* [ ngx.shared.DICT.free_space] ( https://github.com/openresty/lua-nginx-module#ngxshareddictfree_space )
162162* [ ngx.shared.DICT.capacity] ( https://github.com/openresty/lua-nginx-module#ngxshareddictcapacity )
163163
164+ [ Back to TOC] ( #table-of-contents )
165+
164166## resty.core.var
165167
166168* [ ngx.var.VARIABLE] ( https://github.com/openresty/lua-nginx-module#ngxvarvariable )
Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ The API is still in flux and may change in the future without notice.
3232Synopsis
3333========
3434
35- Enables privileged agent process and get process type
36- -----------------------------------------------------
35+ Enables privileged agent process, gets process type, and then gets the master process PID:
3736
3837``` nginx
3938# http config
@@ -61,6 +60,7 @@ server {
6160 content_by_lua_block {
6261 local process = require "ngx.process"
6362 ngx.say("process type: ", process.type())
63+ ngx.say("master process pid: ", process.get_master_pid() or "-")
6464 }
6565 }
6666}
@@ -80,6 +80,7 @@ The example location above produces the following response body:
8080
8181```
8282process type: worker
83+ master process pid: 8261
8384```
8485
8586[ Back to TOC] ( #table-of-contents )
You can’t perform that action at this time.
0 commit comments