utils: 'with-atomic-file-output' calls 'fdatasync'.
authorLudovic Courtès <ludo@gnu.org>
Mon, 13 Jun 2016 15:52:08 +0000 (17:52 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 13 Jun 2016 16:05:54 +0000 (18:05 +0200)
commit1752a17a1e6f7138892eeeb4806cd04ccb3ca1b0
treeb214b397e41996725a20c81da83bc4cd4187383e
parent9f8ee3fe0ed615a89520618c4df66647845b15b3
utils: 'with-atomic-file-output' calls 'fdatasync'.

Suggested by Danny Milosavljevic <dannym@scratchpost.org>
at <https://lists.gnu.org/archive/html/guix-devel/2016-06/msg00456.html>.

* guix/build/syscalls.scm (fdatasync): New procedure.
* guix/utils.scm (with-atomic-file-output): Use it.  Use 'close-port'
instead of 'close'.
guix/build/syscalls.scm
guix/utils.scm