diff options
author | Christian Kögler <ck3d@gmx.de> | 2020-09-06 21:27:59 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-09-06 22:52:13 +0200 |
commit | 3a3f0056f357b4fa2b9f725725806d370395ff39 (patch) | |
tree | 77f932e59c0bd296d89325e66d99bf25d8a40ce5 | |
parent | ba968f2161ffb4e936c283487249ea28601964c4 (diff) | |
download | redo-c-3a3f0056f357b4fa2b9f725725806d370395ff39.tar.gz redo-c-3a3f0056f357b4fa2b9f725725806d370395ff39.tar.xz redo-c-3a3f0056f357b4fa2b9f725725806d370395ff39.zip |
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]
-rw-r--r-- | redo.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } } |