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()
|
task.wait()
|
||||||
# If wait for spanwed process (look for process with task pid) and we can look for them...
|
# 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'):
|
if psutil and waitForSubp and hasattr(task, 'pid'):
|
||||||
logger.debug('Waiting for subprocesses...')
|
subProcesses = list(filter(
|
||||||
for i in filter(
|
|
||||||
lambda x: x.ppid() == task.pid, psutil.process_iter(attrs=('ppid',))
|
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)
|
logger.debug('Found %s', i)
|
||||||
i.wait()
|
i.wait()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user