Skip to main content

spawn_process

Function spawn_process 

Source
pub fn spawn_process(binary: &str, args: &[String]) -> Result<i32, ProcessError>
Expand description

Spawns zot in the background, writes the PID file, and returns. The caller does not wait for zot; zot survives as a detached child (own session via setsid). stdout and stderr are redirected to paths::log_path.

Once this returns, the caller has no further control over the child’s lifecycle beyond signalling it via stop_process: the child is reaped by a background thread so it never lingers as a zombie.