MCPcopy Create free account
hub / github.com/bloomberg/pystack / _read_maps

Function _read_maps

src/pystack/maps.py:100–105  ·  view source on GitHub ↗
(pid: int)

Source from the content-addressed store, hash-verified

98
99
100def _read_maps(pid: int) -> List[str]:
101 try:
102 with open(f"/proc/{pid}/maps") as maps:
103 return maps.readlines()
104 except FileNotFoundError:
105 raise ProcessNotFound(f"No such process id: {pid}") from None
106
107
108def generate_maps_for_process(pid: int) -> Iterable[VirtualMap]:

Callers 1

Calls 1

ProcessNotFoundClass · 0.85

Tested by

no test coverage detected