Changeset 13920
- Timestamp:
- Feb 1, 2013, 6:54:39 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7x/libtransmission/fdlimit.c
r13631 r13920 289 289 tr_close_file (int fd) 290 290 { 291 #if defined (HAVE_POSIX_FADVISE)292 /* Set hint about not caching this file.293 It's okay for this to fail silently, so don't let it affect errno */294 const int err = errno;295 posix_fadvise (fd, 0, 0, POSIX_FADV_DONTNEED);296 errno = err;297 #endif298 #ifdef SYS_DARWIN299 /* it's unclear to me from the man pages if this actually flushes out the cache,300 * but it couldn't hurt... */301 fcntl (fd, F_NOCACHE, 1);302 #endif303 291 close (fd); 304 292 }
Note: See TracChangeset
for help on using the changeset viewer.