fix: take the probe lock per standalone run

standalone_probe now holds the host probe lock for one run, its load check included, as core_probe does, and the docs no longer wrap region_check or standalone_probe in flock.
This commit is contained in:
Abdessamad Derraz committed 2026-10-27 21:08:47 +01:00
1 parent f8b54cc53a
commit 1c613dc4b4
3 files changed
+36 -5

No files matched your search

+7
View File
@@ -510,6 +510,13 @@ def probe(args: argparse.Namespace) -> int:
for problem in problems:
print(f"ERROR: {problem}", file=sys.stderr)
return 2
# One run on the host at a time, as core_probe: the lock is held for
# this run, its load check included, and freed when it ends.
with cp.host_probe_lock():
return _probe(args, emu)
def _probe(args: argparse.Namespace, emu: Emulator) -> int:
meta, tree = installed(emu, args.sha256)
max_load = args.max_load if args.max_load is not None else (os.cpu_count() or 1) / 4
load_before = cp.load_average()