Expand description
Fast offline detection for IPFRS CLI
Determines whether the IPFRS daemon is running and reachable within a bounded timeout (≤ 2 s). The checks are deliberately cheap:
- Look for the PID file on disk — if it is missing the daemon is definitely not running.
- Send signal 0 to the recorded PID to verify the process still exists
(POSIX
kill(pid, 0)semantic, implemented viastd::process::Command).
A separate helper with_network_timeout wraps any Future with a
configurable deadline so network-bound commands never block indefinitely.
Constants§
- DAEMON_
CHECK_ TIMEOUT - Maximum time budget for all daemon-reachability checks.
Functions§
- check_
daemon_ reachable - Check whether the IPFRS daemon is reachable.
- offline_
error_ message - Build a user-friendly error message for the case where the IPFRS daemon is not running or not reachable.
- with_
network_ timeout - Wrap a future with a wall-clock timeout.