George Mochrie wrote:
> hi
> 
> A quick question:
> 
> Is there an easy way to check if a process is running given it's PID? There 
> seems to be nothing like Process.exists?(pid). If I was root I could use 
> Process.kill(0,pid) to test, but the program needs to run as a plain user. Do 

Not only root can do kill(0, pid), any user can send signal (or 0) to 
his/her own processes.

On systems that have /proc you can also check for presence of a 
directory named like pid there.

> I have to parse the output from ps -e?
> 
> Thanks in advance :)

Gennady.