diff options
Diffstat (limited to 'src/info.rs')
-rw-r--r-- | src/info.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/info.rs b/src/info.rs index e441b16..bd94205 100644 --- a/src/info.rs +++ b/src/info.rs @@ -29,6 +29,10 @@ pub fn time(offset: time::UtcOffset) -> anyhow::Result<String> { )) } +pub fn pid() -> String { + nix::unistd::getpid().to_string() +} + // the time crate is currently unable to get the local offset on unix due to // soundness concerns, so we have to do it manually/: // |