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

Function sigKillChildHandler

src/server.cpp:6861–6866  ·  view source on GitHub ↗

This is the signal handler for children process. It is currently useful * in order to track the SIGUSR1, that we send to a child in order to terminate * it in a clean way, without the parent detecting an error and stop * accepting writes because of a write error condition. */

Source from the content-addressed store, hash-verified

6859 * it in a clean way, without the parent detecting an error and stop
6860 * accepting writes because of a write error condition. */
6861static void sigKillChildHandler(int sig) {
6862 UNUSED(sig);
6863 int level = g_pserver->in_fork_child == CHILD_TYPE_MODULE? LL_VERBOSE: LL_WARNING;
6864 serverLogFromHandler(level, "Received SIGUSR1 in child, exiting now.");
6865 exitFromChild(SERVER_CHILD_NOERROR_RETVAL);
6866}
6867
6868void setupChildSignalHandlers(void) {
6869 struct sigaction act;

Callers

nothing calls this directly

Calls 2

serverLogFromHandlerFunction · 0.85
exitFromChildFunction · 0.85

Tested by

no test coverage detected