aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-05-18 18:28:07 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-05-22 12:19:41 -0500
commit37e29442721af0dc3846e87ef2b85a474af3cf2b (patch)
tree38c5287a823747a018138d0834bfb14782ad2e0f /src/librc
parent4e0eace837287845504c9895429dc9f64872d075 (diff)
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.
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/librc.c4
1 files changed, 4 insertions, 0 deletions
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) {