test cgi kill

Fri, 24 May 2024 22:57:09 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 24 May 2024 22:57:09 +0200
changeset 527
bc6b4f3d92af
parent 526
6c06b845701a
child 528
8206bfafb7a6

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);
+            }
         }
     }
     

mercurial