Skip to main content

Module daemon

Module daemon 

Source
Expand description

Daemonization support for running hyprstream in the background

Provides helper functions for detaching the process from the terminal and running as a background daemon.

§Usage

ⓘ
use hyprstream::cli::daemon::maybe_daemonize;

// In server startup, before creating tokio runtime:
maybe_daemonize(detach, working_dir, pid_file)?;

Functions§

check_running
Check if a PID file exists and the process is still running
maybe_daemonize
Daemonize the process if requested
stop_daemon
Stop a running daemon by sending SIGTERM