This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ldconfig: Call fsync on temporary files before renaming them [BZ #20890]


Florian Weimer wrote:
    if (write (fd, strings, total_strlen) != (ssize_t) total_strlen
-      || close (fd))
+      || fsync (fd) != 0
+      || close (fd) != 0)
      error (EXIT_FAILURE, errno, _("Writing of cache data failed"));

Would fdatasync suffice, instead of fsync?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]