Expand description
IPC accept loop.
Binds a UDS (Unix) or named pipe (Windows), accepts incoming
connections, and spawns a per-connection handler task. Graceful
shutdown is driven by a tokio_util::sync::CancellationToken;
after cancellation, the loop drains active connections bounded by
crate::config::DaemonConfig::ipc_shutdown_drain_secs.
The two Unix bind branches (RuntimeDir vs Configured) implement
the Phase 8a iter-1 B2 fix: runtime-dir paths are auto-managed
(parent created 0700, stale socket removed after a liveness probe).
Configured paths also auto-unlink stale sockets after a liveness
probe confirms no process is listening — this is required for
auto-start to work after a daemon stop. Live sockets are never
touched: the daemon refuses to bind if a live daemon is already
listening. Non-socket files at the configured path are always
rejected.
Structs§
- IpcServer
- Top-level IPC server handle. Construct with
Self::bindthen drive withSelf::run.