MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / child_handler

Function child_handler

src/main.cpp:48–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46static int otherSig;
47
48static void child_handler(int signum) {
49 switch(signum) {
50 case SIGCHLD:
51 // fall-through
52 case SIGINT:
53 // fall-through
54 case SIGALRM:
55 retval = EXIT_FAILURE;
56 exitApp = true;
57 break;
58 case SIGKILL:
59 SI_LOG_INFO("stopping (KILL)" );
60 // fall-through
61 case SIGUSR1:
62 // fall-through
63 case SIGHUP:
64 // fall-through
65 case SIGTERM:
66 retval = EXIT_SUCCESS;
67 exitApp = true;
68 break;
69 default:
70 otherSig = 1;
71 break;
72 }
73}
74
75static void daemonize(const std::string &lockfile, const char *user) {
76 pid_t pid, sid;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected