pub fn remove_cloexec_files(&self) {
        let mut inner = self.inner.lock();
        let close_fds = inner
            .files
            .iter()
            .filter_map(|(fd, file_like)| {
                if let Ok(file) = file_like.clone().downcast_arc::<File>() {
                    if file.flags().close_on_exec() {
                        Some(*fd)
                    } else {
                        None
                    }
                } else {
                    None
                }
            })
            .collect::<Vec<_>>();
        for fd in close_fds {
            inner.files.remove(&fd).map(|_| ()).unwrap();
        }
    }
/// Close file that FD_CLOEXEC is set
Close file that FD_CLOEXEC is set
Close file that FD_CLOEXEC is set
pub fn remove_cloexec_files(&self) {
        let mut inner = self.inner.lock();
        let close_fds = inner
            .files
            .iter()
            .filter_map(|(fd, file_like)| {
                if let Ok(file) = file_like.clone().downcast_arc::<File>() {
                    if file.flags().close_on_exec() {
                        Some(*fd)
                    } else {
                        None
                    }
                } else {
                    None
                }
            })
            .collect::<Vec<_>>();
        for fd in close_fds {
            inner.files.remove(&fd).map(|_| ()).unwrap();
        }
    }
pub fn remove_cloexec_files ( & self ) { let mut inner = self . inner . lock ( ) ; let close_fds = inner . files . iter ( ) . filter_map ( | ( fd , file_like ) | { if let Ok ( file ) = file_like . clone ( ) . downcast_arc :: < File > ( ) { if file . flags ( ) . close_on_exec ( ) { Some ( * fd ) } else { None } } else { None } } ) . collect :: < Vec < _ > > ( ) ; for fd in close_fds { inner . files . remove ( & fd ) . map ( | _ | ( ) ) . unwrap ( ) ; } }
Close file that FD_CLOEXEC is set
Close file that FD_CLOEXEC is set
&self
&self