Skip to main content

Module session_lock

Module session_lock 

Source
Expand description

Single live-session ownership: message + detection shared by service and app.

The canonical event log is single-writer (exclusive flock on session.lock). Live sessions (CLI interactive, desktop service) open it with open_exclusive and fail with SessionBusy when another process holds it. Background readers (retention, query, inspector history) intentionally use shared open and stay available. This module is the one place that names the busy text so the service message and the desktop UI detection cannot drift.

Constants§

SESSION_BUSY_MARKER
Stable substring present in every session-busy message.

Functions§

is_session_busy_message
Whether a backend error message reports session-busy contention.
session_busy_message
Full actionable busy message for session_id.