From 31ebc4025843003cd96ed99ec3ad1585cc893b4e Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Wed, 3 Feb 2010 16:27:21 +0100 Subject: [PATCH] reap workers here. --- gunicorn/arbiter.py | 1 + gunicorn/util.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index ef65ff37..589673e1 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -237,6 +237,7 @@ class Arbiter(object): def handle_chld(self, sig, frame): self.wakeup() + self.reap_workers() def handle_hup(self): self.log.info("Master hang up.") diff --git a/gunicorn/util.py b/gunicorn/util.py index c355cc52..b44ed408 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -28,7 +28,7 @@ weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] - + def get_maxfd(): maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1] if (maxfd == resource.RLIM_INFINITY):