A Rusty way to check if another instance is running?
I have a Linux-specific CLI tool that needs to ensure no other instance of the process is running. It currently relies on a \pgrep\\ command but that's an external dependency and feels a bit hacky.
The sysinfo crate is a good option, but I feel like it would be an overkill just for this small check.
I'm looking for a way to do this in an efficient way while also keeping the dependencies light. Does anyone know how I can achieve this without any dependencies in Rust? If not, are there any lightweight crates for this specific case?