MCPcopy Create free account
hub / github.com/OpenSteam001/OpenSteamTool / ResolveProcess

Function ResolveProcess

src/Pipe/PipeManager.cpp:36–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 }
35
36 ProcessInspector::ProcessSnapshot ResolveProcess(PID_t pid) {
37 if (auto cached = TryReuseCachedProcess(pid)) return *cached;
38
39 // First sighting: inspect once and cache so sibling pipes reuse it. A dead
40 // process yields creationTime=0, so skip caching that junk key.
41 const ProcessInspector::ProcessSnapshot snapshot = ProcessInspector::InspectProcess(pid);
42 const ProcessKey processKey = MakeProcessKey(snapshot);
43 if (processKey.IsValid()) g_processes[processKey] = snapshot;
44 return snapshot;
45 }
46
47} // namespace
48

Callers 1

OnHandshakeFunction · 0.85

Calls 4

TryReuseCachedProcessFunction · 0.85
InspectProcessFunction · 0.85
MakeProcessKeyFunction · 0.85
IsValidMethod · 0.45

Tested by

no test coverage detected