MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ldbRemoveChild

Function ldbRemoveChild

src/scripting.cpp:2049–2056  ·  view source on GitHub ↗

If the specified pid is among the list of children spawned for * forked debugging sessions, it is removed from the children list. * If the pid was found non-zero is returned. */

Source from the content-addressed store, hash-verified

2047 * forked debugging sessions, it is removed from the children list.
2048 * If the pid was found non-zero is returned. */
2049int ldbRemoveChild(pid_t pid) {
2050 listNode *ln = listSearchKey(ldb.children,(void*)(unsigned long)pid);
2051 if (ln) {
2052 listDelNode(ldb.children,ln);
2053 return 1;
2054 }
2055 return 0;
2056}
2057
2058/* Return the number of children we still did not receive termination
2059 * acknowledge via wait() in the parent process. */

Callers 1

checkChildrenDoneFunction · 0.85

Calls 2

listSearchKeyFunction · 0.85
listDelNodeFunction · 0.85

Tested by

no test coverage detected