diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/MPILauncher.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/MPILauncher.py index dc4fa1e1d4981af5e9903311be5662272fbd122f..1b5fc8e5827338f0a07812b19050061e602d812b 100644 --- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/MPILauncher.py +++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/MPILauncher.py @@ -179,7 +179,8 @@ class MPILauncher(object): def _any_child_status(self, status): try: parent = psutil.Process(self._process.pid) - return any([ + children = parent.children(recursive=True) + return not children or any([ child.status() in status for child in parent.children(recursive=True) ]) @@ -220,7 +221,6 @@ class MPILauncher(object): while not self._any_child_status([psutil.STATUS_STOPPED, psutil.STATUS_ZOMBIE]): time.sleep(2) - self._kill_children() if self._any_child_status([psutil.STATUS_SLEEPING, psutil.STATUS_RUNNING]):