chiark / gitweb /
cgi-fcgi-interp: new garbage collection approach, wip compile
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 29 Mar 2016 18:25:28 +0000 (19:25 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 29 Mar 2016 18:32:51 +0000 (19:32 +0100)
cprogs/cgi-fcgi-interp.c

index 35ce536..99997d0 100644 (file)
@@ -581,6 +581,19 @@ static void alarm_handler(int dummy) {
   queue_alarm();
 }
 
+static void child_handler(int dummy) {
+  for (;;) {
+    int status;
+    pid_t got = waitpid(-1, &status, WNOHANG);
+    if (got == (pid_t)-1) err(127,"(stage2) waitpid");
+    if (got != script_child) {
+      warn("(stage2) waitpid got status %d for unknown child [%lu]",
+          status, (unsigned long)got);
+      continue;
+    }
+    if (status
+      
+
 static void setup_handlers(void) {
   struct sigaction sa;
   int r;