fs/io/FileOutputStream: use O_TMPFILE if available

The Linux feature allows writing new files to an invisible file, and
then replace the old file.  This preserves the old file if we get
interrupted by some event.
This commit is contained in:
Max Kellermann
2015-01-05 20:24:59 +01:00
parent ac62586bad
commit 8b217d5313
4 changed files with 70 additions and 9 deletions

View File

@@ -219,7 +219,7 @@ AC_SEARCH_LIBS([socket], [socket])
AC_SEARCH_LIBS([gethostbyname], [nsl])
if test x$host_is_linux = xyes; then
AC_CHECK_FUNCS(pipe2 accept4)
AC_CHECK_FUNCS(pipe2 accept4 linkat)
fi
AC_CHECK_FUNCS(getpwnam_r getpwuid_r)