summaryrefslogtreecommitdiffstats
path: root/base/file_util_android.cc
diff options
context:
space:
mode:
authormcgrathr@chromium.org <mcgrathr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 18:07:05 +0000
committermcgrathr@chromium.org <mcgrathr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 18:07:05 +0000
commit103dccfa2877fed72cdcd7daafba3c81a51ab923 (patch)
treed45afb9c2a47c9fe53c0e98dfd0f3d02f4dd173d /base/file_util_android.cc
parenta1cff7858ed955e9792955dce46277ba57b2cb81 (diff)
downloadchromium_src-103dccfa2877fed72cdcd7daafba3c81a51ab923.zip
chromium_src-103dccfa2877fed72cdcd7daafba3c81a51ab923.tar.gz
chromium_src-103dccfa2877fed72cdcd7daafba3c81a51ab923.tar.bz2
Adaptively use temp dir instead of /dev/shm for executable shmem file on Linux
On some Linux systems, files from /dev/shm cannot have PROT_EXEC applied to their mappings. This depends on picayune setup details that vary between distributions and kernels and could vary between installations. So just use an empirical test of whether it works or not, and fall back to using generic temporary space instead of /dev/shm for the executable case if needed. BUG= http://code.google.com/p/chromium/issues/detail?id=103377 TEST= SharedMemory.AnonymousExecutable with /dev/shm mounted noexec R=mark@chromium.org Review URL: http://codereview.chromium.org/8800025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_android.cc')
-rw-r--r--base/file_util_android.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/file_util_android.cc b/base/file_util_android.cc
index eff3a46..6807d8d 100644
--- a/base/file_util_android.cc
+++ b/base/file_util_android.cc
@@ -8,7 +8,7 @@
namespace file_util {
-bool GetShmemTempDir(FilePath* path) {
+bool GetShmemTempDir(FilePath* path, bool executable) {
*path = FilePath("/data/local/tmp");
return true;
}