projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b9c30e
)
core: disable the effect of Restart= if there's a stop job pending for a service...
author
Lennart Poettering
<lennart@poettering.net>
Sat, 26 Aug 2017 13:07:23 +0000
(15:07 +0200)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sat, 26 Aug 2017 13:07:23 +0000
(22:07 +0900)
We shouldn't undo the job already enqueued, under any circumstances.
Fixes: #6504
src/core/service.c
patch
|
blob
|
history
diff --git
a/src/core/service.c
b/src/core/service.c
index
f43f13e
..
004e2a7
100644
(file)
--- a/
src/core/service.c
+++ b/
src/core/service.c
@@
-1498,8
+1498,14
@@
static bool service_will_restart(Service *s) {
static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart) {
int r;
+
assert(s);
+ /* If there's a stop job queued before we enter the DEAD state, we shouldn't act on Restart=, in order to not
+ * undo what has already been enqueued. */
+ if (unit_stop_pending(UNIT(s)))
+ allow_restart = false;
+
if (s->result == SERVICE_SUCCESS)
s->result = f;