From 962b7401c57607bb1004c868e5e47d29f1cea373 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Tue, 12 Jan 2016 08:56:10 +0000 Subject: [PATCH] Mark service active if it is started while not active. (It will mark itself inactive when it stops). --- src/service.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/service.cc b/src/service.cc index f810b04..e319a6f 100644 --- a/src/service.cc +++ b/src/service.cc @@ -300,6 +300,10 @@ void ServiceRecord::start(bool activate) noexcept } if (desired_state == ServiceState::STARTED && service_state != ServiceState::STOPPED) return; + + if (required_by == 0) { + service_set->service_active(this); + } desired_state = ServiceState::STARTED; do_start(); -- 2.25.1