diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-08-28 18:50:52 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-08-28 18:50:52 +0200 |
commit | b23009162688e361cf8e3ab3cba74234adbab5fd (patch) | |
tree | 8234fd76373353c9d4d509eb6db377dbe2b87979 | |
parent | b1ba703f2ddb6707f5931faa88b4ad8a6c07a7e8 (diff) |
Dead-lock detection if a task runs but doesn't become 'undirty' as a result.
-rw-r--r-- | build.cc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -54,6 +54,12 @@ int build(const Settings& settings, auto task = getNextTask(all_tasks, dirtyTasks); if(task == nullptr) { + if(processes.empty() && !dirtyTasks.empty()) + { + // No running processes, yet no process to run. This is a dead-lock... + std::cout << "Dead-lock detected.\n"; + return 1; + } break; } |