use ps to check if process is still running
This commit is contained in:
parent
a51c7416d5
commit
2ea5714d95
@ -39,12 +39,7 @@ class OSRMLauncher
|
|||||||
|
|
||||||
def osrm_up?
|
def osrm_up?
|
||||||
if @pid
|
if @pid
|
||||||
begin
|
`ps -o state -p #{@pid}`.split[1].to_s =~ /^[DRST]/
|
||||||
Process.getpgid @pid
|
|
||||||
true
|
|
||||||
rescue Errno::ESRCH
|
|
||||||
false
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user