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)
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)
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)
def terminate_proc(self): try: process_utils.kill_process_tree(log.logger, self.process.pid) self.process.terminate() except Exception as e: pass
def terminate(self): if self.process: process_utils.kill_process_tree(log.logger, None)#os.getpid())