MCPcopy Index your code
hub / github.com/python/cpython / get_child_pids

Function get_child_pids

Lib/profiling/sampling/_child_monitor.py:28–39  ·  view source on GitHub ↗

Get all child process IDs of the given process. Args: pid: Process ID of the parent process recursive: If True, return all descendants (children, grandchildren, etc.) Returns: List of child PIDs

(pid, recursive=True)

Source from the content-addressed store, hash-verified

26
27
28def get_child_pids(pid, recursive=True):
29 """
30 Get all child process IDs of the given process.
31
32 Args:
33 pid: Process ID of the parent process
34 recursive: If True, return all descendants (children, grandchildren, etc.)
35
36 Returns:
37 List of child PIDs
38 """
39 return _remote_debugging.get_child_pids(pid, recursive=recursive)
40
41
42def is_python_process(pid):

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…