115 |
log("Update of loadavg has failed!\n"); |
log("Update of loadavg has failed!\n"); |
116 |
|
|
117 |
} |
} |
118 |
|
|
119 |
for(s= servicelist; s; s= s->next) { |
for(s= servicelist; s; s= s->next) { |
120 |
if(s->visited) |
if(s->visited) |
121 |
continue; |
continue; |
122 |
do_validate(s, pt, treesize); |
LOCK(s->mutex) |
123 |
|
do_validate(s, pt, treesize); |
124 |
|
END_LOCK; |
125 |
} |
} |
126 |
|
|
127 |
reset_depend(); |
reset_depend(); |
153 |
ASSERT(s); |
ASSERT(s); |
154 |
ASSERT(s->path); |
ASSERT(s->path); |
155 |
|
|
|
/* Obtain service action mutex */ |
|
|
LOCK(s->mutex) |
|
|
|
|
156 |
/* First, check for pre-conditions */ |
/* First, check for pre-conditions */ |
157 |
if(do_not_validate(s)) { |
if(do_not_validate(s)) { |
|
/* Release service action mutex */ |
|
|
pthread_mutex_unlock(&s->mutex); |
|
158 |
return; |
return; |
159 |
} |
} |
160 |
|
|
202 |
} |
} |
203 |
|
|
204 |
/** Common task actions */ |
/** Common task actions */ |
205 |
if (! check_timestamps(s)) |
if(! check_timestamps(s)) |
206 |
goto reinstall; |
goto reinstall; |
|
|
|
207 |
|
|
208 |
reinstall: |
reinstall: |
209 |
|
|
210 |
/* Remove the SIGTERM block */ |
/* Remove the SIGTERM block */ |
211 |
pthread_sigmask(SIG_SETMASK, &os, NULL); |
pthread_sigmask(SIG_SETMASK, &os, NULL); |
|
|
|
|
/* Release service action mutex */ |
|
|
END_LOCK; |
|
212 |
|
|
213 |
} |
} |
214 |
|
|