File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,8 @@ API Implemented
161
161
* [ ngx.shared.DICT.free_space] ( https://github.com/openresty/lua-nginx-module#ngxshareddictfree_space )
162
162
* [ ngx.shared.DICT.capacity] ( https://github.com/openresty/lua-nginx-module#ngxshareddictcapacity )
163
163
164
+ [ Back to TOC] ( #table-of-contents )
165
+
164
166
## resty.core.var
165
167
166
168
* [ 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.
32
32
Synopsis
33
33
========
34
34
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:
37
36
38
37
``` nginx
39
38
# http config
@@ -61,6 +60,7 @@ server {
61
60
content_by_lua_block {
62
61
local process = require "ngx.process"
63
62
ngx.say("process type: ", process.type())
63
+ ngx.say("master process pid: ", process.get_master_pid() or "-")
64
64
}
65
65
}
66
66
}
@@ -80,6 +80,7 @@ The example location above produces the following response body:
80
80
81
81
```
82
82
process type: worker
83
+ master process pid: 8261
83
84
```
84
85
85
86
[ Back to TOC] ( #table-of-contents )
You can’t perform that action at this time.
0 commit comments