Fix cross-process race in initial files/cache dir creation
Apps that run components in separate processes, especially that host providers in separate processes, can hit a race condition where two processes simultaneously discover that the files/cache dir must be created, then each calls mkdirs(). One of these will fail not because the dir couldn't be created, but because it lost the race and mkdirs() returned false to signal that it already existed -- and this was assumed to be a hard failure. We now recheck existence after a mkdirs() failure to discern this case and proceed appropriately. Bug 10515463 Change-Id: I13fbdd838921223f75ab11faa47291c82b21c650
Loading
Please register or sign in to comment