pidlock

Crates.iopidlock
lib.rspidlock
version0.1.6
sourcesrc
created_at2018-05-19 02:05:37.050743
updated_at2023-12-16 04:59:15.480464
descriptionA library for using pidfiles as resource locks
homepage
repositoryhttps://github.com/rockstar/pidlock
max_upload_size
id66080
size14,032
Paul Hummer (rockstar)

documentation

README

pidlock

A library for working with pidfiles, with a lock-like API.

Usage

extern crate pidlock;

fn main() {
    let mut lock = pidlock::Pidlock::new("/path/to/pidfile.pid");
    lock.acquire().unwrap();

    ...

    lock.release().unwrap();
}

License

pidlock is licensed under the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

Commit count: 25

cargo fmt