diff --git a/kong/tools/io.lua b/kong/tools/io.lua index 8f5f1cc7086..dba1d6557ad 100644 --- a/kong/tools/io.lua +++ b/kong/tools/io.lua @@ -35,7 +35,9 @@ end -- -- @param {string} the pid to kill function _M.kill_process_by_pid(pid, signal) - return _M.os_execute("kill "..(signal and "-"..tostring(signal).." " or "")..pid.." && wait "..pid) + local res, code = _M.os_execute("kill "..(signal and "-"..tostring(signal).." " or "")..pid) + _M.os_execute("wait "..pid) + return res, code end function _M.read_file(path)