File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,16 @@ local auto_ssl = require "resty.auto-ssl"
22local lock = require " resty.lock"
33local shell_blocking = require " shell-games"
44
5+ local run = shell_blocking .capture_combined
6+ -- Don't capture output in older OpenResty versions prior to SIGCHLD handling
7+ -- being fixed: https://github.com/openresty/lua-nginx-module/pull/1296
8+ -- While this still seems to work, it can cause sporadic, but hard to reproduce
9+ -- errors (that don't affect behavior) in the test suite against older
10+ -- OpenResty versions.
11+ if ngx .config .ngx_lua_version < 10014 then
12+ run = shell_blocking .run
13+ end
14+
515local function start ()
616 local _ , set_false_err = ngx .shared .auto_ssl_settings :safe_set (" sockproc_started" , false )
717 if set_false_err then
@@ -10,7 +20,7 @@ local function start()
1020
1121 ngx .log (ngx .NOTICE , " auto-ssl: starting sockproc" )
1222
13- local _ , run_err = shell_blocking . capture_combined ({ auto_ssl .lua_root .. " /bin/resty-auto-ssl/start_sockproc" }, { umask = " 0022" })
23+ local _ , run_err = run ({ auto_ssl .lua_root .. " /bin/resty-auto-ssl/start_sockproc" }, { umask = " 0022" })
1424 if run_err then
1525 ngx .log (ngx .ERR , " auto-ssl: failed to start sockproc: " , run_err )
1626 else
You can’t perform that action at this time.
0 commit comments