Esempio n. 1
0
def terminate_local_process(runner, process):
    ret = process.poll()
    if ret is None:
        runner.write("Killing local process...")
        kill_process(process)
    else:
        runner.write("Local process is already dead (ret={})".format(ret))
Esempio n. 2
0
 def terminate_if_alive():
     runner.write("Shutting down local process...\n")
     if p.poll() is None:
         runner.write("Killing local process...\n")
         kill_process(p)
Esempio n. 3
0
def terminate_local_process(runner, process):
    if process.poll() is None:
        runner.write("Killing local process...")
        kill_process(process)
Esempio n. 4
0
 def kill(self) -> None:
     if self.killer is None:
         self.killer = lambda: kill_process(self.process)
     self.killer()
     self.process.wait()