OSDN Git Service

RRO: Synchronize access to overlays.list
authorMartin Wallgren <martin.wallgren@sonymobile.com>
Tue, 11 Aug 2015 13:10:31 +0000 (15:10 +0200)
committerShunta Sato <shunta.sato@sonymobile.com>
Wed, 12 Oct 2016 06:42:04 +0000 (15:42 +0900)
commitf12af5e90727869d225f169e7f475695da64bf48
tree15f3f5ebb0533a6de66d060662234577183b1721
parent1a02a2683814661fd1fb6ab811fc8f76dc610511
RRO: Synchronize access to overlays.list

idmap --scan is executed as a part of the pre-loading in ZygoteInit.
The pre loading is executed in parallel for each supported architecture
(32/64 bit). This will cause a race condition in the creation of the
overlays.list file and the idmap files for the system overlays.

Apply flock on overlays.list to prevent the file from being thrown away
and recreated when it is in use by another Zygote.

Bug: 28032298

Change-Id: I51d39f121d207b11181340b68b164b60020f0c61
cmds/idmap/scan.cpp
libs/androidfw/AssetManager.cpp