more info on subprocesses

This commit is contained in:
Adolfo Gómez García 2021-06-23 15:14:12 +02:00
parent f20a5a33b0
commit 97841d655b

View File

@ -177,10 +177,11 @@ def waitForTasks() -> None:
task.wait()
# If wait for spanwed process (look for process with task pid) and we can look for them...
if psutil and waitForSubp and hasattr(task, 'pid'):
logger.debug('Waiting for subprocesses...')
for i in filter(
subProcesses = list(filter(
lambda x: x.ppid() == task.pid, psutil.process_iter(attrs=('ppid',))
):
))
logger.debug('Waiting for subprocesses... %s', task.pid, subProcesses)
for i in subProcesses:
logger.debug('Found %s', i)
i.wait()
except Exception as e: