Changeset 13920


Ignore:
Timestamp:
Feb 1, 2013, 6:54:39 PM (8 years ago)
Author:
jordan
Message:

(2.7x) backport r13803 for bug #5102

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7x/libtransmission/fdlimit.c

    r13631 r13920  
    289289tr_close_file (int fd)
    290290{
    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 #endif
    298 #ifdef SYS_DARWIN
    299     /* 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 #endif
    303291    close (fd);
    304292}
Note: See TracChangeset for help on using the changeset viewer.