[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Monit 4: dependancies bug
From: |
Marco Bisioli |
Subject: |
Monit 4: dependancies bug |
Date: |
Thu, 02 Oct 2003 14:16:50 +0200 |
Hi,
I noticed a bug(?) in monit 4: stopping a service does not stop all
dependant services. The solution is:
file: control.c
function: static void do_depend(Service_T s, char *action)
To solve the problem I replaced the return with a break, see the code:
...
for(d= child->dependantlist; d; d= d->next) {
log(" do_depend('%s','%s')
depends:'%s'\n",s->name,action,d->dependant);
if(IS(d->dependant, s->name)) {
log(" do_depend('%s','%s') '%s'
MATCH\n",s->name,action,child->name);
if(IS(action, "start"))
do_start(child);
else if(IS(action, "monitor"))
do_monitor(child);
do_depend(child, action);
if(IS(action, "stop"))
do_stop(child);
else if(IS(action, "unmonitor"))
do_unmonitor(child);
- //return; // mabi, removed
+ break; //mabi, go on with outer loop
}
bye,
Marco
- Monit 4: dependancies bug,
Marco Bisioli <=