MCPcopy Create free account
hub / github.com/F-Stack/f-stack / killRDBChild

Function killRDBChild

app/redis-6.2.6/src/rdb.c:2850–2858  ·  view source on GitHub ↗

Kill the RDB saving child using SIGUSR1 (so that the parent will know * the child did not exit for an error, but because we wanted), and performs * the cleanup needed. */

Source from the content-addressed store, hash-verified

2848 * the child did not exit for an error, but because we wanted), and performs
2849 * the cleanup needed. */
2850void killRDBChild(void) {
2851 kill(server.child_pid, SIGUSR1);
2852 /* Because we are not using here waitpid (like we have in killAppendOnlyChild
2853 * and TerminateModuleForkChild), all the cleanup operations is done by
2854 * checkChildrenDone, that later will find that the process killed.
2855 * This includes:
2856 * - resetChildState
2857 * - rdbRemoveTempFile */
2858}
2859
2860/* Spawn an RDB child that writes the RDB to the sockets of the slaves
2861 * that are currently in SLAVE_STATE_WAIT_BGSAVE_START state. */

Callers 5

rdbPipeReadHandlerFunction · 0.85
readSyncBulkPayloadFunction · 0.85
prepareForShutdownFunction · 0.85
freeClientFunction · 0.85
flushAllDataAndResetRDBFunction · 0.85

Calls 1

killFunction · 0.85

Tested by

no test coverage detected