Skip to main content

Module close

Module close 

Source
Expand description

ClientFrame::Close (synaps daemon close <ID|NAME> [--force]): end one session from a control connection, without attaching to it.

The daemon sends the session the engine command close with host authority (from: None), so the actor’s own /close runs unchanged: the same blockers (and force), the same parked exemption (a parked session is never rebuilt), the same reply text. Host authority is no more power than daemon stop, which already ends every session from any same-uid shell, but this command is targeted (and the target can be a prefix), so a session with clients attached is refused unless the caller passes attached (--attached). force does not imply it.

Enums§

ResolveError
Why resolve_session found no single session.

Constants§

CLOSE_END_BUDGET
How long the session may take to end once it accepted: finish’s worst case plus a margin.
CLOSE_REPLY_BUDGET
How long the actor may take to answer close. The command waits in the queue behind whatever the actor is doing (an inline compaction, a preflight), so this is queue latency, not the end itself.
CLOSE_SEND_RETRY
How long a full command queue is retried before giving up (the actor drains it between commands).
MIN_PREFIX_LEN
Shortest prefix resolve_session accepts: the date part of an id (20261021). Exact ids, journal ids and names are not prefixes.

Functions§

close_session
Serve Close{session_id, force, attached}. Always answers with one frame: Closed, Refused{Busy|UnknownSession} or Error.
resolve_session
Resolve what a user typed (synaps daemon close X) against a session listing, most specific first: exact id, exact journal id, exact name (two sessions with that name = ambiguous), then a prefix of exactly one session’s id or journal id, at least MIN_PREFIX_LEN characters long. Never guesses between candidates.