use ps to check if process is still running

This commit is contained in:
Emil Tin 2012-12-16 20:51:19 +01:00
parent a51c7416d5
commit 2ea5714d95

View File

@ -39,12 +39,7 @@ class OSRMLauncher
def osrm_up?
if @pid
begin
Process.getpgid @pid
true
rescue Errno::ESRCH
false
end
`ps -o state -p #{@pid}`.split[1].to_s =~ /^[DRST]/
else
false
end