diff options
author | Brian Carlstrom <bdc@google.com> | 2013-08-12 17:04:14 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2013-08-15 10:33:53 -0700 |
commit | 7571e8b761ebc2c923525e12ea9fcf07e62cb33e (patch) | |
tree | 5d90ecf4d0ba1a72b040a376f227df1ba9278889 /oatdump | |
parent | 2e250c826b3c405d675017efe79e5db3651c9ee6 (diff) | |
download | art-7571e8b761ebc2c923525e12ea9fcf07e62cb33e.zip art-7571e8b761ebc2c923525e12ea9fcf07e62cb33e.tar.gz art-7571e8b761ebc2c923525e12ea9fcf07e62cb33e.tar.bz2 |
Add flock(2)ing on dex-cache files to prevent races
Bug: 9071417
Change-Id: I1ee9ff281867f90fba7a8ed8bbf06b33ac29d511
Diffstat (limited to 'oatdump')
-rw-r--r-- | oatdump/oatdump.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index 67398af..fbfdfd9 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -777,7 +777,7 @@ class ImageDumper { os_ = saved_os; } os << "STATS:\n" << std::flush; - UniquePtr<File> file(OS::OpenFile(image_filename_.c_str(), false)); + UniquePtr<File> file(OS::OpenFileForReading(image_filename_.c_str())); stats_.file_bytes = file->GetLength(); size_t header_bytes = sizeof(ImageHeader); stats_.header_bytes = header_bytes; |