MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / findRandomProcess

Function findRandomProcess

src/processrunner.cpp:115–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113};
114
115InterestingProcess findRandomProcess(const env::Process& root)
116{
117 for (auto&& c : root.children()) {
118 env::HandlePtr h = c.openHandleForWait();
119 if (h) {
120 return {c, Interest::Weak, std::move(h)};
121 }
122
123 auto r = findRandomProcess(c);
124 if (r.handle) {
125 return r;
126 }
127 }
128
129 return {};
130}
131
132// returns a process that's in the hidden list, or the top-level process if
133// they're all hidden; returns an invalid process if the list is empty

Callers 1

Calls 2

childrenMethod · 0.80
openHandleForWaitMethod · 0.80

Tested by

no test coverage detected