Expand description
Why a daemon process stopped, recorded beside its socket.
A control daemon or guardian that disappears without a trace forces a
post-mortem from process lists alone. Every planned exit path (the
winx.shutdown RPC, a termination signal, a listener failure) records a
small JSON file next to the socket and logs the reason once, so doctor
and the control daemon’s reaper can tell a planned restart from a crash.
A hard kill still leaves no record, which is itself the signal: a stale
socket with no exit record means the process did not get to say goodbye.
Structs§
- Exit
Record - What a daemon wrote when it last exited on purpose.
Enums§
- Exit
Reason - Why the process is exiting.
Functions§
- install
- Remember who this process is and arm the signal handlers that turn a termination signal into a recorded exit. Later calls are ignored: one process binds one socket.
- leave
- Record
reasonfor this process and exit with status 0. Callers use it only after the in-flight response has been written. - read_
record - Read the exit record beside
socket, if the daemon left one. - record_
current - Record
reasonfor this process without exiting (listener failures that propagate an error tomain). - record_
path - Path of the exit record kept beside
socket. - take_
record - Remove the exit record beside
socket, returning what it said. - write_
record - Write the exit record for
socketatomically (temp file plus rename).