Set F_GLOBAL_NOCACHE for Mac OS X

pull/36/head
Tatsuhiro Tsujikawa 2012-11-28 21:47:55 +09:00
parent 506a9358e1
commit 74520b03f8
1 changed files with 3 additions and 0 deletions

View File

@ -118,6 +118,9 @@ int openFileWithFlags(const std::string& filename, int flags,
util::safeStrerror(errNum).c_str()),
errCode);
}
#if defined(__APPLE__) && defined(__MACH__)
fcntl(fd, F_GLOBAL_NOCACHE, 1);
#endif // __APPLE__ && __MACH__
return fd;
}
} // namespace