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:
William Hubbs 2018-05-18 18:28:07 -05:00
parent 4e0eace837
commit 37e2944272

View File

@ -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) {
dirs = ls_dir(RC_SVCDIR "/scheduled", 0);
TAILQ_FOREACH(dir, dirs, entries) {