From 22230ef4bb6dc80d2dca8d5a128f208fff72c181 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Tue, 13 Nov 2007 15:22:10 -0300 Subject: [PATCH 1/1] Handle SIGCHLD in PyminDaemon. --- pymin/pymindaemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pymin/pymindaemon.py b/pymin/pymindaemon.py index ccb943d..3881857 100644 --- a/pymin/pymindaemon.py +++ b/pymin/pymindaemon.py @@ -15,6 +15,7 @@ from pymin.dispatcher import handler from pymin import dispatcher from pymin import eventloop from pymin import serializer +from pymin import procman class PyminDaemon(eventloop.EventLoop): r"""PyminDaemon(root, bind_addr) -> PyminDaemon instance @@ -58,12 +59,15 @@ class PyminDaemon(eventloop.EventLoop): def timer(loop, signum): loop.handle_timer() signal.alarm(loop.timer) + def child(loop, signum): + procman.sigchild_handler(signum) # Create EventLoop eventloop.EventLoop.__init__(self, sock, signals={ signal.SIGINT: quit, signal.SIGTERM: quit, signal.SIGUSR1: reload_config, signal.SIGALRM: timer, + signal.SIGCHLD: child, }) # Create Dispatcher #TODO root.pymin = PyminHandler() -- 2.43.0