Crates.io | pidlock |
lib.rs | pidlock |
version | 0.1.6 |
source | src |
created_at | 2018-05-19 02:05:37.050743 |
updated_at | 2023-12-16 04:59:15.480464 |
description | A library for using pidfiles as resource locks |
homepage | |
repository | https://github.com/rockstar/pidlock |
max_upload_size | |
id | 66080 |
size | 14,032 |
A library for working with pidfiles, with a lock-like API.
extern crate pidlock;
fn main() {
let mut lock = pidlock::Pidlock::new("/path/to/pidfile.pid");
lock.acquire().unwrap();
...
lock.release().unwrap();
}
pidlock is licensed under the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)