original_docstring: 
          Run a WSGI server with the given application.
  
          :param application: The application to run in the WSGI server
          :param conf: a cfg.ConfigOpts object
          :param default_port: Port to bind to if none is specified in conf
          
docstring: Run a WSGI server with the given application.
docstring_tokens: Run a WSGI server with the given application .
code: def start(self, application, conf, default_port):
          """
          Run a WSGI server with the given application.
  
          :param application: The application to run in the WSGI server
          :param conf: a cfg.ConfigOpts object
          :param default_port: Port to bind to if none is specified in conf
          """
          def kill_children(*args):
              """Kills the entire process group."""
              self.logger.error(_('SIGTERM received'))
              signal.signal(signal.SIGTERM, signal.SIG_IGN)
              self.running = False
              os.killpg(0, signal.SIGTERM)
  
          def hup(*args):
              """
              Shuts down the server, but allows running requests to complete
              """
              self.logger.error(_('SIGHUP received'))
              signal.signal(signal.SIGHUP, signal.SIG_IGN)
              self.running = False
  
          self.application = application
          self.sock = get_socket(conf, default_port)
          conf.register_opt(workers_opt)
  
          self.logger = logging.getLogger('eventlet.wsgi.server')
  
          if conf.workers == 0:
              # Useful for profiling, test, debug etc.
              self.pool = eventlet.GreenPool(size=self.threads)
              self.pool.spawn_n(self._single_run, application, self.sock)
              return
  
          self.logger.info(_("Starting %d workers") % conf.workers)
          signal.signal(signal.SIGTERM, kill_children)
          signal.signal(signal.SIGHUP, hup)
          while len(self.children) < conf.workers:
              self.run_child()
code_tokens: def start ( self , application , conf , default_port ) : def kill_children ( * args ) : """Kills the entire process group.""" self . logger . error ( _ ( 'SIGTERM received' ) ) signal . signal ( signal . SIGTERM , signal . SIG_IGN ) self . running = False os . killpg ( 0 , signal . SIGTERM ) def hup ( * args ) : """
              Shuts down the server, but allows running requests to complete
              """ self . logger . error ( _ ( 'SIGHUP received' ) ) signal . signal ( signal . SIGHUP , signal . SIG_IGN ) self . running = False self . application = application self . sock = get_socket ( conf , default_port ) conf . register_opt ( workers_opt ) self . logger = logging . getLogger ( 'eventlet.wsgi.server' ) if conf . workers == 0 : self . pool = eventlet . GreenPool ( size = self . threads ) self . pool . spawn_n ( self . _single_run , application , self . sock ) return self . logger . info ( _ ( "Starting %d workers" ) % conf . workers ) signal . signal ( signal . SIGTERM , kill_children ) signal . signal ( signal . SIGHUP , hup ) while len ( self . children ) < conf . workers : self . run_child ( )
short_docstring: Run a WSGI server with the given application.
short_docstring_tokens: Run a WSGI server with the given application .
comment: """
          Run a WSGI server with the given application.
  
          :param application: The application to run in the WSGI server
          :param conf: a cfg.ConfigOpts object
          :param default_port: Port to bind to if none is specified in conf
          """$SEP$"""Kills the entire process group."""$SEP$"""
              Shuts down the server, but allows running requests to complete
              """$SEP$# Useful for profiling, test, debug etc.