Example #1
0
    def terminate(self):
        """
        if self.process.stdout:
            self.process.stdout.close()

        if self.process.stdin:
            self.process.stdin.close()

        if self.process.stderr:
            self.process.stderr.close()
        """

        if self.process and psutil.pid_exists(self.process.pid):
            process_utils.kill_process_tree(log.logger, self.process.pid)
Example #2
0
    def terminate(self):
        """
        if self.process.stdout:
            self.process.stdout.close()

        if self.process.stdin:
            self.process.stdin.close()

        if self.process.stderr:
            self.process.stderr.close()
        """

        if self.process and psutil.pid_exists(self.process.pid):
            process_utils.kill_process_tree(log.logger, self.process.pid)
Example #3
0
def sigint_handler(sig, frame):
    print "{} signal {}, frame {}".format(datetime.datetime.now(), sig, frame)
    process_utils.kill_process_tree(log.logger, None)
    sys.exit(0)
Example #4
0
def sigint_handler(sig, frame):
    print ("{} signal {}, frame {}".format(datetime.datetime.now(), sig, frame))
    process_utils.kill_process_tree(log.logger, None)
    sys.exit(0)
Example #5
0
 def terminate_proc(self):
     try:
         process_utils.kill_process_tree(log.logger, self.process.pid)
         self.process.terminate()
     except Exception as e:
         pass
Example #6
0
 def terminate_proc(self):
     try:
         process_utils.kill_process_tree(log.logger, self.process.pid)
         self.process.terminate()
     except Exception as e:
         pass
Example #7
0
 def terminate(self):
     if self.process:
         process_utils.kill_process_tree(log.logger, None)#os.getpid())