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

Function exitFromChild

src/server.cpp:1318–1324  ·  view source on GitHub ↗

After an RDB dump or AOF rewrite we exit from children using _exit() instead of * exit(), because the latter may interact with the same file objects used by * the parent process. However if we are testing the coverage normal exit() is * used in order to obtain the right coverage information. */

Source from the content-addressed store, hash-verified

1316 * the parent process. However if we are testing the coverage normal exit() is
1317 * used in order to obtain the right coverage information. */
1318void exitFromChild(int retcode) {
1319#ifdef COVERAGE_TEST
1320 exit(retcode);
1321#else
1322 _exit(retcode);
1323#endif
1324}
1325
1326/*====================== Hash table type implementation ==================== */
1327

Callers 6

rdbSaveBackgroundForkFunction · 0.85
rdbSaveToSlavesSocketsFunction · 0.85
sigKillChildHandlerFunction · 0.85
RM_ExitFromChildFunction · 0.85
ldbEndSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected