Skip to content

Commit

Permalink
chore(cmd): return error on signal sending failures
Browse files Browse the repository at this point in the history
  • Loading branch information
flrgh authored and vm-001 committed Aug 29, 2023
1 parent 4dd16cc commit 2d40a9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kong/cmd/utils/nginx_signals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ local function send_signal(kong_conf, signal)

log.verbose("sending %s signal to nginx running at %s", signal, kong_conf.nginx_pid)

if not process.signal(pid, signal) then
return nil, "could not send signal"
local ok, err = process.signal(pid, signal)
if not ok then
return nil, fmt("could not send signal: %s", err or "unknown error")
end

return true
Expand Down

0 comments on commit 2d40a9c

Please sign in to comment.