93 |
static void do_default(); /* Do default action */ |
static void do_default(); /* Do default action */ |
94 |
static RETSIGTYPE do_wakeup(int); /* Signalhandler for a daemon wakeup call */ |
static RETSIGTYPE do_wakeup(int); /* Signalhandler for a daemon wakeup call */ |
95 |
static int do_wakeupcall(); /* Wakeup a sleeping monit daemon */ |
static int do_wakeupcall(); /* Wakeup a sleeping monit daemon */ |
96 |
|
static void do_signal_block(); /* Block all signals used by monit */ |
97 |
static void handle_options(int, char **); /* Handle program options */ |
static void handle_options(int, char **); /* Handle program options */ |
98 |
static void help(); /* Print program help message to stdout */ |
static void help(); /* Print program help message to stdout */ |
99 |
static void version(); /* Print version information */ |
static void version(); /* Print version information */ |
113 |
|
|
114 |
do_init(); |
do_init(); |
115 |
do_action(argv); |
do_action(argv); |
116 |
|
do_signal_block(); |
|
signal(SIGHUP, SIG_IGN); |
|
|
signal(SIGINT, SIG_IGN); |
|
|
signal(SIGTERM, SIG_IGN); |
|
|
signal(SIGUSR1, SIG_IGN); |
|
117 |
do_destroy(SIGSTOP); |
do_destroy(SIGSTOP); |
118 |
|
|
119 |
exit(0); |
exit(0); |
617 |
} |
} |
618 |
|
|
619 |
|
|
620 |
|
/* |
621 |
|
* Block all signals used by monit. This method is called at |
622 |
|
* application termination to avoid signals to interrupt a graceful |
623 |
|
* shutdown. |
624 |
|
*/ |
625 |
|
static void do_signal_block() { |
626 |
|
|
627 |
|
sigset_t block; |
628 |
|
|
629 |
|
set_signal_block(&block, NULL); |
630 |
|
|
631 |
|
} |
632 |
|
|
633 |
|
|
634 |
/** |
/** |
635 |
* Handle program options - Options set from the commandline |
* Handle program options - Options set from the commandline |
636 |
* takes precedence over those found in the control file |
* takes precedence over those found in the control file |