def process_running?(pid)
      return false unless pid
      Process.getpgid(pid) != -1
    rescue Errno::ESRCH
      false
    end
def process_running?(pid)
      return false unless pid
      Process.getpgid(pid) != -1
    rescue Errno::ESRCH
      false
    end
Checks whether process with given pid is running

 === Parameters
 pid(Fixnum):: Process id to be checked

 === Return
 true:: If process is running
 false:: Otherwise