Changeset 13803
- Timestamp:
- Jan 18, 2013, 7:20:22 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/fdlimit.c
r13681 r13803 285 285 tr_close_file (int fd) 286 286 { 287 #if defined (HAVE_POSIX_FADVISE)288 /* Set hint about not caching this file.289 It's okay for this to fail silently, so don't let it affect errno */290 const int err = errno;291 posix_fadvise (fd, 0, 0, POSIX_FADV_DONTNEED);292 errno = err;293 #endif294 #ifdef SYS_DARWIN295 /* it's unclear to me from the man pages if this actually flushes out the cache,296 * but it couldn't hurt... */297 fcntl (fd, F_NOCACHE, 1);298 #endif299 287 close (fd); 300 288 }
Note: See TracChangeset
for help on using the changeset viewer.