chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca7abd8
)
cgi-fcgi-interp: new garbage collection approach, wip compile
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 29 Mar 2016 18:25:28 +0000
(19:25 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 29 Mar 2016 18:32:51 +0000
(19:32 +0100)
cprogs/cgi-fcgi-interp.c
patch
|
blob
|
history
diff --git
a/cprogs/cgi-fcgi-interp.c
b/cprogs/cgi-fcgi-interp.c
index 35ce536a57e90e49fa836c0698b6a8c45624f925..99997d08745220efec0702fe36b0251d7d1e45fa 100644
(file)
--- a/
cprogs/cgi-fcgi-interp.c
+++ b/
cprogs/cgi-fcgi-interp.c
@@
-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;