Only kill process if not already dead
This commit is contained in:
parent
bfac482940
commit
9916802a69
@ -779,8 +779,7 @@ class Boss:
|
|||||||
def destroy(self):
|
def destroy(self):
|
||||||
self.shutting_down = True
|
self.shutting_down = True
|
||||||
self.child_monitor.shutdown_monitor()
|
self.child_monitor.shutdown_monitor()
|
||||||
if self.update_check_process is not None:
|
self.set_update_check_process()
|
||||||
self.update_check_process.kill()
|
|
||||||
self.update_check_process = None
|
self.update_check_process = None
|
||||||
del self.child_monitor
|
del self.child_monitor
|
||||||
for tm in self.os_window_map.values():
|
for tm in self.os_window_map.values():
|
||||||
@ -986,7 +985,13 @@ class Boss:
|
|||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def set_update_check_process(self, process):
|
def set_update_check_process(self, process=None):
|
||||||
|
if self.update_check_process is not None:
|
||||||
|
try:
|
||||||
|
if self.update_check_process.poll() is None:
|
||||||
|
self.update_check_process.kill()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
self.update_check_process = process
|
self.update_check_process = process
|
||||||
|
|
||||||
def on_monitored_pid_death(self, pid, exit_status):
|
def on_monitored_pid_death(self, pid, exit_status):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user