| 46 | static int otherSig; |
| 47 | |
| 48 | static 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 | |
| 75 | static void daemonize(const std::string &lockfile, const char *user) { |
| 76 | pid_t pid, sid; |
nothing calls this directly
no outgoing calls
no test coverage detected