From: gp Date: 2003-02-19T00:48:29+09:00 Subject: I need to check if a process is running Hi, I need to check if a process is running. I have this code for this: ------------------------------------------ pid="2212" cmd="ps -f p "+pid out=`#{cmd}` lines=out.split(/\n/) if (lines.length==1) then print "Process with PID="+pid+" doesn't running.\n" end if (lines.length==2) then print "Process with PID="+pid+" is running.\n" end ------------------------------------------ Is there any other method for this? Is there any possibility to check this directly with ruby? Thanks, Gian Paolo