Re-evaluate all cached processes with current target names
| 202 | |
| 203 | // Re-evaluate all cached processes with current target names |
| 204 | void ProcessResolver::RefreshTargetMatching() { |
| 205 | LOG_A(LOG_INFO, "ProcessResolver: Re-evaluating all cached processes with current target names"); |
| 206 | std::lock_guard<std::mutex> lock(cache_mutex); |
| 207 | |
| 208 | for (auto& pair : cache) { |
| 209 | DWORD pid = pair.first; |
| 210 | Process& process = pair.second; |
| 211 | // Don't observe ourselves |
| 212 | if (contains_case_insensitive(process.name, "rededr.exe")) { |
| 213 | process.observe = FALSE; |
| 214 | continue; |
| 215 | } |
| 216 | process.ObserveIfMatchesTargets(targetProcessNames); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | |
| 221 | // Log statistics about the current cache state |
no test coverage detected