/// Wait for child process to end
Wait for child process to end
Wait for child process to end
fn wait_child(child: &mut std::process::Child) -> Option<i32> {
    match child.try_wait() {
        Ok(Some(status)) => status.code(),
        Ok(None) => match child.wait() {
            Ok(status) => status.code(),
            _ => None,
        },
        Err(e) => {
            log::error!("Error attempting to wait for child: {}", e);
            None
        }
    }
}
fn wait_child ( child : & mut std :: process :: Child ) -> Option < i32 > { match child . try_wait ( ) { Ok ( Some ( status ) ) => status . code ( ) , Ok ( None ) => match child . wait ( ) { Ok ( status ) => status . code ( ) , _ => None , } , Err ( e ) => { log :: error ! ( " " e ) ; None } } }
Wait for child process to end
Wait for child process to end
child
&mut std::process::Child