cache_store: handle missing process.
If we try to kill the process but it's already dead just ignore it.
This commit is contained in:
parent
108999f7d7
commit
7eb4b92d30
@ -89,7 +89,12 @@ class CacheStoreDatabase
|
||||
end
|
||||
rescue ErrorDuringExecution, Timeout::Error
|
||||
odebug "Failed to read #{dbm_file_path}!"
|
||||
Process.kill(:KILL, dbm_test_read_cmd.pid)
|
||||
begin
|
||||
Process.kill(:KILL, dbm_test_read_cmd.pid)
|
||||
rescue Errno::ESRCH
|
||||
# Process has already terminated.
|
||||
nil
|
||||
end
|
||||
false
|
||||
end
|
||||
cache_path.delete unless dbm_test_read_success
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user