From 37e29442721af0dc3846e87ef2b85a474af3cf2b Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 18 May 2018 18:28:07 -0500 Subject: 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. --- src/librc/librc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/librc') diff --git a/src/librc/librc.c b/src/librc/librc.c index 4473a1bb..01bfac03 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -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) { -- cgit v1.2.3