Last active
May 4, 2020 03:33
-
-
Save jdx/f40709ea7abfd3b76f8886cc14111c51 to your computer and use it in GitHub Desktop.
c++ check if pid is running
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool pid_id_active(pid_t pid) { | |
return kill(pid, 0) == 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment