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

Function ldbKillForkedSessions

src/scripting.cpp:2065–2077  ·  view source on GitHub ↗

Kill all the forked sessions. */

Source from the content-addressed store, hash-verified

2063
2064/* Kill all the forked sessions. */
2065void ldbKillForkedSessions(void) {
2066 listIter li;
2067 listNode *ln;
2068
2069 listRewind(ldb.children,&li);
2070 while((ln = listNext(&li))) {
2071 pid_t pid = (unsigned long) ln->value;
2072 serverLog(LL_WARNING,"Killing debugging session %ld",(long)pid);
2073 kill(pid,SIGKILL);
2074 }
2075 listRelease(ldb.children);
2076 ldb.children = listCreate();
2077}
2078
2079/* Wrapper for EVAL / EVALSHA that enables debugging, and makes sure
2080 * that when EVAL returns, whatever happened, the session is ended. */

Callers 1

prepareForShutdownFunction · 0.85

Calls 5

listRewindFunction · 0.85
listNextFunction · 0.85
serverLogFunction · 0.85
listReleaseFunction · 0.85
listCreateFunction · 0.85

Tested by

no test coverage detected