MCPcopy Create free account
hub / github.com/3rdparty/libprocess / exited

Method exited

src/process.cpp:2274–2306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2272
2273
2274void SocketManager::exited(const Address& address)
2275{
2276 // TODO(benh): It would be cleaner if this routine could call back
2277 // into ProcessManager ... then we wouldn't have to convince
2278 // ourselves that the accesses to each Process object will always be
2279 // valid.
2280 synchronized (mutex) {
2281 if (!links.remotes.contains(address)) {
2282 return; // No linkees for this socket address!
2283 }
2284
2285 foreach (const UPID& linkee, links.remotes[address]) {
2286 // Find and notify the linkers.
2287 CHECK(links.linkers.contains(linkee));
2288
2289 foreach (ProcessBase* linker, links.linkers[linkee]) {
2290 process_manager->deliver(linker, new ExitedEvent(linkee));
2291
2292 // Remove the linkee pid from the linker.
2293 CHECK(links.linkees.contains(linker));
2294
2295 links.linkees[linker].erase(linkee);
2296 if (links.linkees[linker].empty()) {
2297 links.linkees.erase(linker);
2298 }
2299 }
2300
2301 links.linkers.erase(linkee);
2302 }
2303
2304 links.remotes.erase(address);
2305 }
2306}
2307
2308
2309void SocketManager::exited(ProcessBase* process)

Callers 1

synchronizedFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected