Quote:
Originally Posted by Fallon
I'm trying to write a script that'll check if a process is running. I searched around on the net for one and i found a php script that seems to work, but it requires a command called pidof. I've searched around but I haven't been able to find it yet so I figured I'd ask. Thanks.
|
The more common way is to check for a pid file of the process.
I don't know wether you have access to the script you're trying to detect, or it's pid file, but if I were to write both, I'd use a pid file
=> a pid file, is a file at a specified location (that you can check) that has the pid (process identifier) of the script that is running. Checking the file gives you the pid.
Probably lot's of situations where this solution won't fly, but I thought I'd drop the idea anyway