Compare commits

...
Author SHA1 Message Date
rkervella 853a7abf10 Fix recursion to exclude self node 2023-07-11 12:19:16 -07:00
+7
View File
@@ -50,9 +50,16 @@ func (n *node) insert(proc *commonpb.Process) {
}
func (n *node) findParent(proc *commonpb.Process) *node {
// Empty node
if n.Value == nil {
return nil
}
// Skip self when called from reorder
// otherwise things might explode, see #1340
if n.Value.Pid == proc.Pid {
return nil
}
// Found parent
if n.Value.Pid == proc.Ppid {
return n
}