/// Wait for the child process to return, log the exit status and send
/// `ReplicaExited`-message to `exit_recipient`.
Wait for the child process to return, log the exit status and send
`ReplicaExited`-message to `exit_recipient`.
Wait for the child process to return log the exit status and send ` ReplicaExited ` - message to ` exit_recipient ` .
fn wait_on_exit(
    log: slog::Logger,
    mut process: std::process::Child,
    pid_cell: PIDCell,
) -> impl FnOnce() {
    move || {
        let exit_status = process.wait();
        if let Err(e) = &exit_status {
            warn!(log, "wait() for replica returned error: {:?}", e);
        } else {
            info!(log, "Replica exited. Exit Status: {:?}", exit_status);
        }
        let _pid = pid_cell.lock().unwrap().take();
    }
}
fn wait_on_exit ( log : slog :: Logger , mut process : std :: process :: Child , pid_cell : PIDCell , ) -> impl FnOnce ( ) { move | | { let exit_status = process . wait ( ) ; if let Err ( e ) = & exit_status { warn ! ( log " " e ) ; } else { info ! ( log " " exit_status ) ; } let _pid = pid_cell . lock ( ) . unwrap ( ) . take ( ) ; } }
Wait for the child process to return, log the exit status and send
`ReplicaExited`-message to `exit_recipient`.
Wait for the child process to return log the exit status and send ` ReplicaExited ` - message to ` exit_recipient ` .
log
slog::Logger
process
std::process::Child
pid_cell
PIDCell