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

Diff of /monit/monitor.c

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

revision 1.56 by hauk, Sat Jul 19 01:02:41 2003 UTC revision 1.57 by hauk, Sun Aug 3 07:55:53 2003 UTC
# Line 133  static void do_init() { Line 133  static void do_init() {
133    signal(SIGUSR1, do_wakeup);    signal(SIGUSR1, do_wakeup);
134    
135    /*    /*
136       * Register interest for the SIGINT signal,
137       * in case we run as a server but not as a daemon
138       * we need to catch this signal if the user pressed
139       * CTRL^C in the terminal
140       */
141      signal(SIGINT, do_destroy);
142    
143      /*
144     * Register interest for the SIGHUP signal,     * Register interest for the SIGHUP signal,
145     * in case we run in daemon mode this signal     * in case we run in daemon mode this signal
146     * will reload the configuration.     * will reload the configuration.
# Line 482  static RETSIGTYPE do_destroy(int sig) { Line 490  static RETSIGTYPE do_destroy(int sig) {
490    Run.stopped= TRUE;    Run.stopped= TRUE;
491        
492    switch(sig) {    switch(sig) {
493      case SIGINT:
494          /* Fall trough */
495    case SIGTERM:    case SIGTERM:
496        stop_http();        stop_http();
497        if(Run.isdaemon) {        if(Run.isdaemon) {

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

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