277 |
|
|
278 |
va_list ap; |
va_list ap; |
279 |
char *tmp = NULL; |
char *tmp = NULL; |
|
Dependant_T d; |
|
280 |
|
|
281 |
if (!p->start || !p->do_validate) { |
if (!p->start || !p->do_validate) { |
282 |
|
|
289 |
p->nstart++; |
p->nstart++; |
290 |
|
|
291 |
} |
} |
|
|
|
|
/* stop dependant processes */ |
|
|
for(d= p->dependantlist; d; d= p->dependantlist->next) { |
|
|
if(d->dependant == NULL) { |
|
|
break; |
|
|
} |
|
|
stop_process(get_process(d->dependant)); |
|
|
if(d->next == NULL) { |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
/* Start the process we asked for */ |
|
|
start_process(p); |
|
292 |
|
|
293 |
/* Re-start dependant processes */ |
/* Start process and take care of dependants */ |
294 |
for(d= p->dependantlist; d; d= p->dependantlist->next) { |
force_process(p, PSTART); |
|
if(d->dependant == NULL) { |
|
|
break; |
|
|
} |
|
|
start_process(get_process(d->dependant)); |
|
|
if(d->next == NULL) { |
|
|
break; |
|
|
} |
|
|
} |
|
295 |
|
|
296 |
/* (Re)start alert */ |
/* (Re)start alert */ |
297 |
|
|
322 |
|
|
323 |
va_list ap; |
va_list ap; |
324 |
char *tmp = NULL; |
char *tmp = NULL; |
|
Dependant_T d; |
|
325 |
|
|
326 |
if ( !p->stop || !p->do_validate ) { |
if ( !p->stop || !p->do_validate ) { |
327 |
|
|
351 |
|
|
352 |
sleep(3); /* In case we gonna stop our own smtp server */ |
sleep(3); /* In case we gonna stop our own smtp server */ |
353 |
|
|
354 |
/* stop dependant processes */ |
/* Stop the process and dependants */ |
355 |
for(d= p->dependantlist; d; d= p->dependantlist->next) { |
force_process(p, PSTOP); |
|
if(d->dependant == NULL) { |
|
|
break; |
|
|
} |
|
|
stop_process(get_process(d->dependant)); |
|
|
if(d->next == NULL) { |
|
|
break; |
|
|
} |
|
|
} |
|
356 |
|
|
|
/* Stop the process we asked for */ |
|
|
stop_process(p); |
|
|
|
|
357 |
} |
} |
358 |
|
|
359 |
|
|