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

Function unblockChildThreadIfNecessary

src/rdb.cpp:3675–3684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3673}
3674
3675void unblockChildThreadIfNecessary()
3676{
3677 if (g_pserver->rdbThreadVars.fRdbThreadActive && g_pserver->rdbThreadVars.fRdbThreadCancel) {
3678 char buffer[1024];
3679 if (g_pserver->rdb_pipe_read >= 0) {
3680 while (read(g_pserver->rdb_pipe_read, buffer, sizeof(buffer)) > 0);
3681 }
3682 receiveChildInfo();
3683 }
3684}
3685
3686/* Kill the RDB saving child using SIGUSR1 (so that the parent will know
3687 * the child did not exit for sn error, but because we wanted), and performs

Callers 2

killRDBChildFunction · 0.85
serverCronFunction · 0.85

Calls 1

receiveChildInfoFunction · 0.85

Tested by

no test coverage detected