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:
aec40fd
)
A forced stop at the point of reaching STARTED state should not
author
Davin McCall
<davmac@davmac.org>
Sun, 3 Jan 2016 16:16:21 +0000
(16:16 +0000)
committer
Davin McCall
<davmac@davmac.org>
Sun, 3 Jan 2016 16:16:21 +0000
(16:16 +0000)
actually change the desired state: call start() after stop() if
the desired state is not STOPPED.
service.cc
patch
|
blob
|
history
diff --git
a/service.cc
b/service.cc
index a3a01eb1261b0837da3854115440c1a04a7b1e70..06ec5ada7084f380008368d5f0ba18d5c36367bf 100644
(file)
--- a/
service.cc
+++ b/
service.cc
@@
-416,7
+416,11
@@
void ServiceRecord::started() noexcept
if (force_stop || desired_state == ServiceState::STOPPED) {
// We must now stop.
+ bool do_restart = (desired_state != ServiceState::STOPPED);
stop();
+ if (do_restart) {
+ start();
+ }
return;
}