diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2018-12-03 15:16:17 -0600 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2018-12-03 15:16:17 -0600 |
commit | 9a2115f7620b33e03592fb1eabe5a613984a9894 (patch) | |
tree | 0ac0a3f8ae05f0343c20f7336ef8e616ca184931 /src/rc | |
parent | eeba6df4761777be5af7f9a2876223155921ee37 (diff) |
rc-status: show status for supervised services instead of a list
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/rc-status.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c index 9dbf7c6b..8b73b812 100644 --- a/src/rc/rc-status.c +++ b/src/rc/rc-status.c @@ -300,10 +300,10 @@ int main(int argc, char **argv) /* NOTREACHED */ case 'S': services = rc_services_in_state(RC_SERVICE_STARTED); - TAILQ_FOREACH(s, services, entries) - if (rc_service_value_get(s->value, "child_pid")) { - printf("%s\n", s->value); - } + TAILQ_FOREACH_SAFE(s, services, entries, t) + if (!rc_service_value_get(s->value, "child_pid")) + TAILQ_REMOVE(services, s, entries); + print_services(NULL, services); goto exit; /* NOTREACHED */ case 's': |