Skip to main content

exec

Function exec 

Source
pub async fn exec(
    state: &Arc<DaemonState>,
    paths: &DaemonPaths,
    p: Prepared,
) -> ReloadError
Expand description

Step 5: rewrite daemon.json (generation+1, same pid), stop sidecars, hand the flock to the next image and execv. Returns only on failure — then daemon.json/reload-state are restored, extension discovery is re-spawned (the sidecars were stopped for the exec — M4: no zombie daemon without hooks), and the old image keeps serving (sessions checkpointed but alive; clients that got Bye reconnect to THIS image — a reconnect_of.generation mismatch is tolerated, the daemon answers with its own generation).