summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Nosek <root@localdomain.pl>2014-01-09 03:10:43 -0800
committerGrzegorz Nosek <root@localdomain.pl>2014-01-09 03:10:43 -0800
commit66e7b7d978185db7e19f21caf1da55850490046a (patch)
tree8100b87ea48f55f147da3592d85e7415cba875dc
parent4b2151ef965bfcf90b9ebdcf759a5f788368116f (diff)
parent2041deb6da8825095e007cd5638abd6ffc4f3a4e (diff)
downloadfcgiwrap-66e7b7d978185db7e19f21caf1da55850490046a.tar.xz
fcgiwrap-66e7b7d978185db7e19f21caf1da55850490046a.zip
Merge pull request #20 from Lekensteyn/fix-bug-18
prefork: Fix 100% CPU usage in parent process
-rw-r--r--fcgiwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fcgiwrap.c b/fcgiwrap.c
index e86ff9d..d4f7901 100644
--- a/fcgiwrap.c
+++ b/fcgiwrap.c
@@ -623,7 +623,7 @@ static void sigchld_handler(int dummy)
{
int status;
- while ((dummy = waitpid(-1, &status, WNOHANG)) != -1) {
+ while ((dummy = waitpid(-1, &status, WNOHANG)) > 0) {
/* sanity check */
if (nrunning > 0)
nrunning--;