# File lib/ramaze/bin/helper.rb, line 20 def is_running?(pid) return false if !File.exist?(pid) pid = File.read(pid).to_i if is_windows? wmi = WIN32OLE.connect("winmgmts://") processes, ours = wmi.ExecQuery( "select * from win32_process where ProcessId = #{pid}" ), [] processes.each { |process| ours << process.Name } return ours.first.nil? else begin prio = Process.getpriority(Process::PRIO_PROCESS, pid) return true rescue Errno::ESRCH return false end end end