Created
September 13, 2018 10:24
-
-
Save cosmos-sajal/1c6d1084f20d467cc72b184679d36f72 to your computer and use it in GitHub Desktop.
Is a process running
This file contains 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
/** | |
* @return boolean | |
*/ | |
public function isProcessRunning($pid) | |
{ | |
if (file_exists("/proc/".$pid)) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment