librc: Add check for crashed state
In rc_service_state,, call rc_service_daemons_crashed to check for a crashed daemon if the service is started.
This commit is contained in:
parent
4e0eace837
commit
37e2944272
@ -849,6 +849,10 @@ rc_service_state(const char *service)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state & RC_SERVICE_STARTED) {
|
||||||
|
if (rc_service_daemons_crashed(service))
|
||||||
|
state |= RC_SERVICE_CRASHED;
|
||||||
|
}
|
||||||
if (state & RC_SERVICE_STOPPED) {
|
if (state & RC_SERVICE_STOPPED) {
|
||||||
dirs = ls_dir(RC_SVCDIR "/scheduled", 0);
|
dirs = ls_dir(RC_SVCDIR "/scheduled", 0);
|
||||||
TAILQ_FOREACH(dir, dirs, entries) {
|
TAILQ_FOREACH(dir, dirs, entries) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user