/[monit]/monit/monitor.c
ViewVC logotype

Diff of /monit/monitor.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.73 by martinp, Sun Sep 14 19:20:25 2003 UTC revision 1.74 by hauk, Sun Sep 14 21:00:05 2003 UTC
# Line 93  static RETSIGTYPE  do_destroy(int); Line 93  static RETSIGTYPE  do_destroy(int);
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 */
# Line 112  int main(int argc, char **argv) { Line 113  int main(int argc, char **argv) {
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);
# Line 620  static void do_default() { Line 617  static void do_default() {
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

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26