/// Get a list of current file locks and leases
///
/// Since Linux 4.9, the list of locks is filtered to show just the locks
/// for the processes in the PID namespace for which the `/proc` filesystem
/// was mounted.
Get a list of current file locks and leases
Since Linux 4.9, the list of locks is filtered to show just the locks
for the processes in the PID namespace for which the `/proc` filesystem
was mounted.
Get a list of current file locks and leases Since Linux 4 . 9 the list of locks is filtered to show just the locks for the processes in the PID namespace for which the ` / proc ` filesystem was mounted .
pub fn locks() -> ProcResult<Vec<Lock>> {
    let file = FileWrapper::open("/proc/locks")?;
    let reader = BufReader::new(file);
    let mut v = Vec::new();
    for line in reader.lines() {
        let line = line?;
        v.push(Lock::from_line(&line)?);
    }
    Ok(v)
}
pub fn locks ( ) -> ProcResult < Vec < Lock > > { let file = FileWrapper :: open ( " " ) ? ; let reader = BufReader :: new ( file ) ; let mut v = Vec :: new ( ) ; for line in reader . lines ( ) { let line = line ? ; v . push ( Lock :: from_line ( & line ) ? ) ; } Ok ( v ) }
Get a list of current file locks and leases
Since Linux 4.9, the list of locks is filtered to show just the locks
for the processes in the PID namespace for which the `/proc` filesystem
was mounted.
Get a list of current file locks and leases Since Linux 4 . 9 the list of locks is filtered to show just the locks for the processes in the PID namespace for which the ` / proc ` filesystem was mounted .