xbps-create(8): use fdatasync() rather than fsync().

The latter could be too expensive, and we only care for the data to be written
to the binary package because a bit later we rename() the temporary file,
which will ensure a data flush to disk.
This commit is contained in:
Juan RP 2015-02-27 11:04:25 +01:00
parent 04da57e4f9
commit db21c045d2

View File

@ -895,7 +895,7 @@ main(int argc, char **argv)
*/
binpkg = xbps_xasprintf("%s.%s.xbps", pkgver, arch);
(void)fsync(pkg_fd);
(void)fdatasync(pkg_fd);
myumask = umask(0);
(void)umask(myumask);