(self, kill_signal=signal.SIGTERM)
Kill the browser
Kill the browser
Kill the browser
def kill(self, kill_signal=signal.SIGTERM):
        """Kill the browser"""
        if sys.platform != 'win32':
            self.process_handler.kill()
            for name in self.names:
                for pid in get_pids(name, self.process_handler.pid):
                    self.process_handler.pid = pid
                    self.process_handler.kill()
        else:
            try:
                self.process_handler.kill(group=True)
                # On windows, it sometimes behooves one to wait for dust to settle
                # after killing processes.  Let's try that.
                # TODO: Bug 640047 is invesitgating the correct way to handle this case
                self.process_handler.wait(timeout=10)
            except Exception, e:
                logger.error('Cannot kill process, '+type(e).__name__+' '+e.message)
def kill ( self , kill_signal = signal . SIGTERM ) : if sys . platform != 'win32' : self . process_handler . kill ( ) for name in self . names : for pid in get_pids ( name , self . process_handler . pid ) : self . process_handler . pid = pid self . process_handler . kill ( ) else : try : self . process_handler . kill ( group = True ) # On windows, it sometimes behooves one to wait for dust to settle # after killing processes.  Let's try that. # TODO: Bug 640047 is invesitgating the correct way to handle this case self . process_handler . wait ( timeout = 10 ) except Exception , e : logger . error ( 'Cannot kill process, ' + type ( e ) . __name__ + ' ' + e . message )