Need a portable way to get a process' id? By name? execution path? Window name? libpid to the rescue!
Works for Windows and macOS, Linux to follow.
git clone https://github.com/a3f/libpid.git && cd libpid
mkdir build && cd build
cmake ..
make install
- You can print it!
- You can compare for equality
- You can use it in cross platform code (See lade for an example)
- Eventually, there will be also basic support for inter-process signals, waiting on process state change and creating pid files