2018-03-25 14:55:38 -04:00
|
|
|
use libc::getpid;
|
2018-03-28 17:50:25 -04:00
|
|
|
use uuid::Uuid;
|
2018-03-25 14:55:38 -04:00
|
|
|
|
2018-03-29 17:40:56 -04:00
|
|
|
|
2018-03-25 14:55:38 -04:00
|
|
|
pub fn pid() -> i32 {
|
|
|
|
unsafe { getpid() as i32 }
|
|
|
|
}
|
2018-03-28 17:50:25 -04:00
|
|
|
|
|
|
|
pub fn nonce() -> String {
|
|
|
|
Uuid::new_v4().to_string()
|
|
|
|
}
|