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:
4319a11
)
Remove activated state if a service stops naturally
author
Davin McCall
<davmac@davmac.org>
Fri, 24 Jun 2016 15:30:27 +0000
(16:30 +0100)
committer
Davin McCall
<davmac@davmac.org>
Fri, 24 Jun 2016 15:30:27 +0000
(16:30 +0100)
(if auto-restart is enabled, it will restart instead).
src/service.cc
patch
|
blob
|
history
diff --git
a/src/service.cc
b/src/service.cc
index 566bd0531b28070568c1a0e65ee5353ad1c3cdd2..5425a21f99a7229575678292f9e7c4fde8928c92 100644
(file)
--- a/
src/service.cc
+++ b/
src/service.cc
@@
-91,11
+91,18
@@
void ServiceRecord::stopped() noexcept
service_set->addToStartQueue(this);
}
else {
+ desired_state = ServiceState::STOPPED;
+
if (socket_fd != -1) {
close(socket_fd);
socket_fd = -1;
}
+ if (start_explicit) {
+ start_explicit = false;
+ required_by--;
+ }
+
if (required_by == 0) {
// Service is now completely inactive.
release_dependencies();