test(updater): cover handoff marker edge cases

This commit is contained in:
fangliquan
2026-08-18 21:36:39 +08:00
committed by Brooklyn Nicholson
parent fe4515da69
commit 065c8bd6c0
2 changed files with 18 additions and 4 deletions
@@ -201,6 +201,8 @@ impl UpdateMarkerGuard {
let pid = std::process::id();
if let Some(owner) = live_marker_owner(&path) {
if owner.pid == pid {
// Repeated acquisition in this process is intentionally
// re-entrant because the desktop may have pre-written our pid.
// The desktop races ahead and pre-writes our pid. Adopt that
// claim verbatim: rewriting started_at here lets retries reset
// a wedged updater's age before the stale ceiling can clear it.