You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
939 B

From 6a0d21a508e43ca7a89b700e98fd86a08eff4fee Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 9 Sep 2019 14:38:35 +0200
Subject: [PATCH] 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)
Resolves: #1641777
---
src/core/path.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/core/path.c b/src/core/path.c
index 0533bb4e21..a74cbf2372 100644
--- a/src/core/path.c
+++ b/src/core/path.c
@@ -497,11 +497,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: