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

Diff of /monit/validate.c

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

revision 1.58 by hauk, Thu Jul 31 00:47:18 2003 UTC revision 1.59 by hauk, Sun Aug 3 07:55:53 2003 UTC
# Line 143  void validate() { Line 143  void validate() {
143   * it. If the service listens on a port try to connect to the port and   * it. If the service listens on a port try to connect to the port and
144   * test the stated protocol at the port. If any of the various tests   * test the stated protocol at the port. If any of the various tests
145   * fails then do the specified action on the service.   * fails then do the specified action on the service.
  *  
  * We block for the signals SIGTERM while in this function.  
146   */   */
147  static void do_validate(Service_T s, ProcessTree_T * pt, int treesize) {  static void do_validate(Service_T s, ProcessTree_T * pt, int treesize) {
148        
# Line 158  static void do_validate(Service_T s, Pro Line 156  static void do_validate(Service_T s, Pro
156      return;      return;
157    }    }
158        
159    /* Set a SIGTERM block */    /* Set the signal block */
160    sigemptyset(&ns);    sigemptyset(&ns);
161      sigaddset(&ns, SIGINT);
162    sigaddset(&ns, SIGTERM);    sigaddset(&ns, SIGTERM);
163    pthread_sigmask(SIG_BLOCK, &ns, &os);    pthread_sigmask(SIG_BLOCK, &ns, &os);
164    
# Line 207  static void do_validate(Service_T s, Pro Line 206  static void do_validate(Service_T s, Pro
206                
207    reinstall:    reinstall:
208        
209    /* Remove the SIGTERM block */    /* Remove the signal block */
210    pthread_sigmask(SIG_SETMASK, &os, NULL);    pthread_sigmask(SIG_SETMASK, &os, NULL);
211    
212  }  }

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

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