0

我如何从 linux 内核模块中列出所有分叉进程的树。我知道我可以使用一个级别的分叉进程

list_for_each_entry(child, &parent->children, sibling) {

}

但是我怎样才能获得所有级别,比如

Parent
   |
   child 
      | 
       childs_child

像这样,我知道递归函数在内核中不是很好的选择。那么我将如何遍历父级的所有分叉进程

4

0 回答 0