Expand description
Gateway daemon management — PID file, spawn, stop, status.
The gateway start command spawns the rustyclaw-gateway binary as a
detached background process, writes a PID file to
<settings_dir>/gateway.pid, and stores the log path alongside it.
gateway stop reads that PID file and terminates the process.
gateway restart does stop-then-start.
gateway status checks if the recorded PID is still alive.
All process management uses sysinfo and which for cross-platform
support (macOS, Linux, Windows) with no cfg(unix) gates.
Enums§
- Daemon
Status - Status of the gateway daemon.
- Stop
Result
Functions§
- is_
process_ alive - Check whether a process with the given PID is alive.
- log_
path - Returns the path to the gateway log file:
<settings_dir>/logs/gateway.log. - pid_
path - Returns the path to the PID file:
<settings_dir>/gateway.pid. - read_
pid - Read the stored PID, if the file exists and is valid.
- remove_
pid - Remove the PID file.
- start
- Spawn the
rustyclaw-gatewaybinary as a background process. - status
- Check the current daemon status.
- stop
- Stop a running gateway by terminating the process.
- write_
pid - Write a PID to the PID file.