- signal.signal(signal.SIGINT, quit)
- signal.signal(signal.SIGTERM, quit)
- signal.signal(signal.SIGUSR1, reload_config)
+ 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()
+ self.dispatcher = dispatcher.Dispatcher(root)