diff --git a/prule/daemon/__main__.py b/prule/daemon/__main__.py index 75847ed5966a2a33cb1cd6670f34497d56d2bb8a..20ca6556a6d89c597847539afe2b5aefe9de1739 100644 --- a/prule/daemon/__main__.py +++ b/prule/daemon/__main__.py @@ -739,8 +739,14 @@ class PruleThread(threading.Thread): if self.currentProcess == None: return None proc = self.currentProcess - self.currentProcess.stdin.close() - self.currentProcess.terminate() + try: + self.currentProcess.stdin.close() + except: + pass + try: + self.currentProcess.terminate() + except: + pass returncode = self.currentProcess.wait() print("Prule process {} stopped, returncode {}".format(self.currentProcess.pid, returncode)) with self.stopCondition: