View Single Post
Old 08-18-2004, 01:32 PM   #4 (permalink)
Silvy
paranoid
 
Silvy's Avatar
 
Location: The Netherlands
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
__________________
"Do not kill. Do not rape. Do not steal. These are principles which every man of every faith can embrace. "
- Murphy MacManus (Boondock Saints)
Silvy is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43