MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / get_sub_pid

Method get_sub_pid

mod/project/python/serviceMod.py:645–651  ·  view source on GitHub ↗
(pro: psutil.Process)

Source from the content-addressed store, hash-verified

643 sub_pid = []
644
645 def get_sub_pid(pro: psutil.Process) -> List[int]:
646 tmp_res = []
647 if pro.status() != psutil.STATUS_ZOMBIE and pro.children():
648 for sub_pro in pro.children():
649 tmp_res.append(sub_pro.pid)
650 tmp_res.extend(get_sub_pid(sub_pro))
651 return tmp_res
652
653 for i in res_pid:
654 try:

Callers

nothing calls this directly

Calls 3

statusMethod · 0.45
childrenMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected