Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #828: sighup-patch-828.patch

  • cherrypy/process/plugins.py

    old new  
    5656        self.bus = bus 
    5757        # Set default handlers 
    5858        self.handlers = {'SIGTERM': self.bus.exit, 
    59                          'SIGHUP': self.bus.restart, 
     59                         'SIGHUP': self.handle_restart, 
    6060                         'SIGUSR1': self.bus.graceful, 
    6161                         } 
    6262     
     63    def handle_restart(self): 
     64        if os.isatty(sys.stdin.fileno()): 
     65            # not daemonized 
     66            self.bus.exit() 
     67        else: 
     68            self.bus.restart() 
     69 
    6370    def subscribe(self): 
    6471        for sig, func in self.handlers.iteritems(): 
    6572            try: 

Hosted by WebFaction

Log in as guest/cpguest to create tickets