diff options
Diffstat (limited to 'scripts/Util.py')
-rw-r--r-- | scripts/Util.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/Util.py b/scripts/Util.py index 4f7174fad7e..eca8f96ac0d 100644 --- a/scripts/Util.py +++ b/scripts/Util.py @@ -1051,7 +1051,7 @@ class Process(Runnable): pass def stop(self, current, waitSuccess=False, exitstatus=0): - if self in current.processes: + if self in current.processes and not current.processes[self].isTerminated(): try: if waitSuccess: # Wait for the process to exit successfully by itself. current.processes[self].waitSuccess(exitstatus=exitstatus, timeout=60) @@ -1659,6 +1659,9 @@ class LocalProcessController(ProcessController): self.expect("[^\n]+ ready\n", timeout = startTimeout) readyCount -= 1 + def isTerminated(self): + return self.p is None + def getHost(self, current): # Depending on the configuration, either use an IPv4, IPv6 or BT address for Ice.Default.Host if current.config.ipv6: @@ -1708,6 +1711,7 @@ class RemoteProcessController(ProcessController): def __init__(self, exe, proxy): self.exe = exe self.proxy = proxy + self.terminated = False self.stdout = False def waitReady(self, ready, readyCount, startTimeout): @@ -1727,8 +1731,12 @@ class RemoteProcessController(ProcessController): def trace(self, outfilters): self.stdout = True + def isTerminated(self): + return self.terminated + def terminate(self): self.output = self.proxy.terminate().strip() + self.terminated = True if self.stdout and self.output: print(self.output) |