mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 18:27:23 +02:00
[core] verify chunk hosts a subprocess before killing it
a chunk can be marked as "RUNNING" without hosting a subprocess, if a node is duplicated in the graph
This commit is contained in:
parent
f5d11a8a7a
commit
5897dc13b6
1 changed files with 4 additions and 0 deletions
|
@ -368,6 +368,10 @@ class CommandLineNode(Node):
|
|||
return cmdPrefix + chunk.node.nodeDesc.commandLine.format(**chunk.node._cmdVars) + cmdSuffix
|
||||
|
||||
def stopProcess(self, chunk):
|
||||
# the same node could exists several times in the graph and
|
||||
# only one would have the running subprocess; ignore all others
|
||||
if not hasattr(chunk, "subprocess"):
|
||||
return
|
||||
if chunk.subprocess:
|
||||
# kill process tree
|
||||
processes = chunk.subprocess.children(recursive=True) + [chunk.subprocess]
|
||||
|
|
Loading…
Add table
Reference in a new issue