From 3a3f0056f357b4fa2b9f725725806d370395ff39 Mon Sep 17 00:00:00 2001 From: Christian Kögler Date: Sun, 6 Sep 2020 21:27:59 +0200 Subject: Fix non implicit job lease detection If a job is non implicit, the job lease will never be written back via function vacate. The information non implicit is wrongly derived by the counter implicit_jobs, which will never be negative and therefor run_script is always called with implicit job true. This fix checks if implicit is possible before procuring the job lease. Closes: #5 [via git-merge-pr] --- redo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redo.c b/redo.c index ad8b156..6f2f9d3 100644 --- a/redo.c +++ b/redo.c @@ -816,10 +816,11 @@ redo_ifchange(int targetc, char *targetv[]) continue; } + int implicit = implicit_jobs > 0; if (try_procure()) { procured = 1; targeti++; - run_script(target, implicit_jobs >= 0); + run_script(target, implicit); } } -- cgit 1.4.1