From 2d268adda33752f07cd68e4caa9fcc64d65370a0 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Tue, 15 Aug 2023 09:09:38 -0700 Subject: [PATCH] chore(cmd): return error on signal sending failures --- kong/cmd/utils/nginx_signals.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kong/cmd/utils/nginx_signals.lua b/kong/cmd/utils/nginx_signals.lua index f3adaeeb759b..7b76b8845be6 100644 --- a/kong/cmd/utils/nginx_signals.lua +++ b/kong/cmd/utils/nginx_signals.lua @@ -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