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

Diff of /monit/control.c

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

revision 1.29 by hauk, Fri Dec 20 17:45:38 2002 UTC revision 1.30 by hauk, Fri Dec 20 23:15:21 2002 UTC
# Line 236  void check_process(char *P, char *action Line 236  void check_process(char *P, char *action
236    
237    
238  /*  /*
239   * Reset the visited flag used when handling dependencies   * Reset the visited flags used when handling dependencies
240   */   */
241  void reset_depend() {  void reset_depend() {
242    
# Line 362  static void do_dependant(Process_T p, ch Line 362  static void do_dependant(Process_T p, ch
362                
363        if(d && p->stop && p->start && p->do_validate) {        if(d && p->stop && p->start && p->do_validate) {
364    
365          if(is(action, "stop")) {          if(is(action, "start")) {
           if(is_process_running(parent)) {  
             do_stop(parent, toggle_validate_flag);  
           }  
         } else if(is(action, "start")) {  
366            if(! is_process_running(parent)) {            if(! is_process_running(parent)) {
367              do_start(parent, toggle_validate_flag);              do_start(parent, toggle_validate_flag);
368            }            }
369          }          }
370            
371          do_dependant(parent, action, toggle_validate_flag);          do_dependant(parent, action, toggle_validate_flag);
372            
373            if(is(action, "stop")) {
374              if(is_process_running(parent))
375                  do_stop(parent, toggle_validate_flag);
376            }
377        }        }
         
378      }      }
379    }    }
     
380  }  }
381            
382    

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

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