Fri, 24 May 2024 22:57:09 +0200
test cgi kill
src/server/safs/cgi.c | file | annotate | diff | comparison | revisions |
--- a/src/server/safs/cgi.c Fri May 24 20:24:39 2024 +0200 +++ b/src/server/safs/cgi.c Fri May 24 22:57:09 2024 +0200 @@ -573,6 +573,12 @@ log_ereport(LOG_FAILURE, "cgi-send: kill script: %s pid: %d", handler->path, (int)handler->process.pid); if(killpg(handler->process.pid, SIGKILL)) { log_ereport(LOG_FAILURE, "cgi-send: pid: %d kill failed: %s", (int)handler->process.pid, strerror(errno)); + // test: does kill work? + if(kill(handler->process.pid, SIGKILL)) { + log_ereport(LOG_FAILURE, "cgi-send: pid %d kill2 failed: %s", (int)handler->process.pid, strerror(errno)); + } else { + log_ereport(LOG_DEBUG, "cgi-send: kill(%d, SIGKILL): success", (int)handler->process.pid); + } } }