forked from shaba/openuds
more info on subprocesses
This commit is contained in:
parent
f20a5a33b0
commit
97841d655b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user