SIGNAL_D
Daemon providing a system-wide event notification system. Manages
registration, dispatch, and cleanup of signal handlers (slots), and
persists them across reboots via the swap daemon. Every function below
rejects callers other than the simul_efun layer — register, emit, and
unregister through the slot(), emit(), and unslot() simul_efuns.
# publicnomask register_slot
Registers an object’s function to receive a specific signal. One slot per object per signal — a second registration overwrites the first. Rejected unless the caller is the simul_efun layer.
SIG_SLOT_OK on success, or a negative SIG_* error code # publicnomask unregister_slot
Unregisters an object from a signal. Removes the signal entry entirely once its last handler is gone. Rejected unless the caller is the simul_efun layer.
SIG_SLOT_OK on success, or a negative SIG_* error code # publicnomask dispatch_signal
Broadcasts a signal to every registered handler. Each call is wrapped
in catch() — a failing handler is logged to the SIGNAL_ERROR log and
never blocks the others. Fire-and-forget: no return value. Rejected
unless the caller is the simul_efun layer.
# privatenomask invalidate_slots
Prunes invalid slots — those whose object has been destructed or whose handler function no longer exists. Runs on startup, on every heartbeat (60s), and once more before shutdown.