projects
/
oweals
/
dinit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e335c1
)
Mark service active if it is started while not active.
author
Davin McCall
<davmac@davmac.org>
Tue, 12 Jan 2016 08:56:10 +0000
(08:56 +0000)
committer
Davin McCall
<davmac@davmac.org>
Tue, 12 Jan 2016 08:56:10 +0000
(08:56 +0000)
(It will mark itself inactive when it stops).
src/service.cc
patch
|
blob
|
history
diff --git
a/src/service.cc
b/src/service.cc
index f810b04c7f6ddd34db9b667d1ccd992c831d0e15..e319a6fcb4e725479cd8c2002750ac0bd28dda41 100644
(file)
--- 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();