From 90a69dfbb4927ed1c8193d32d3ea0c2406f3f67a Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Mar 16 2021 04:19:30 +0000 Subject: 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: #1763161 patch_name: 0235-path-stop-watching-path-specs-once-we-triggered-the-.patch present_in_specfile: true location_in_specfile: 235 squash_commits: true --- diff --git a/src/core/path.c b/src/core/path.c index 68b13b6..5ef178a 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -478,11 +478,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: