Bug 575555 – Use fsync() when replacing files to avoid data loss on

2009-03-16  Alexander Larsson  <alexl@redhat.com>

	Bug 575555 – Use fsync() when replacing files to avoid data loss on crash

        * configure.in:
	Look for fsync().

        * glib/gfileutils.c:
        (write_to_temp_file):
	fsync temp file if destination file exists

2009-03-16  Alexander Larsson  <alexl@redhat.com>

	Bug 575555 – Use fsync() when replacing files to avoid data loss on crash

        * glocalfileoutputstream.c:
        (g_local_file_output_stream_close):
        (_g_local_file_output_stream_replace):
	fsync temp file before closing if replacing target file

	

svn path=/trunk/; revision=7991
This commit is contained in:
Alexander Larsson
2009-03-16 16:03:13 +00:00
committed by Alexander Larsson
parent 0b66e52e0b
commit 6cff88ba18
5 changed files with 94 additions and 4 deletions

View File

@@ -563,6 +563,7 @@ AC_CHECK_FUNCS(mmap)
AC_CHECK_FUNCS(posix_memalign)
AC_CHECK_FUNCS(memalign)
AC_CHECK_FUNCS(valloc)
AC_CHECK_FUNCS(fsync)
AC_CHECK_FUNCS(atexit on_exit)