Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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
Esempio n. 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
Esempio n. 7
0
 def terminate(self):
     if self.process:
         process_utils.kill_process_tree(log.logger, None)#os.getpid())