As a way to build a poor-man\'s watchdog and make sure an application is restarted in case it crashes (until I figure out why), I need to write a PHP CLI script that will be
Try this one
function processExists ($pid) { return file_exists("/proc/{$pid}"); }
Function checks whether process file is exists in /proc/ root directory. Works for Linux only
/proc/