summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Sekletar <msekleta@redhat.com>2019-09-09 14:38:35 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-09-21 23:06:58 +0200
commitb294305888da171f393bbb4c3dc0be332e8d50c1 (patch)
tree1d191a8b9d0a6079fa67c5d41e96274080f0017e
parent2cd636c437965b4a2d86aa3b6c74d4117a719f7f (diff)
downloadsystemd-b294305888da171f393bbb4c3dc0be332e8d50c1.tar.gz
path: stop watching path specs once we triggered the target unit
We start watching them again once we get a notification that triggered unit entered inactive or failed state. Fixes: #10503 (cherry picked from commit 8fca6944c2ee20c63d62154c8badddc77170b176)
-rw-r--r--src/core/path.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/path.c b/src/core/path.c
index 562cd352a3..ac1289a658 100644
--- a/src/core/path.c
+++ b/src/core/path.c
@@ -480,11 +480,9 @@ static void path_enter_running(Path *p) {
p->inotify_triggered = false;
- r = path_watch(p);
- if (r < 0)
- goto fail;
-
path_set_state(p, PATH_RUNNING);
+ path_unwatch(p);
+
return;
fail: