Преглед изворни кода

Merge branch 'maint'

* maint:
  Sync conf file to deal with FreeBSD mmap mtime delay.
Bryan Drewery пре 9 година
родитељ
комит
4396051a8b
2 измењених фајлова са 3 додато и 0 уклоњено
  1. 2 0
      doc/UPDATES.md
  2. 1 0
      src/conf.cc

+ 2 - 0
doc/UPDATES.md

@@ -8,6 +8,8 @@
     used.  On most systems this was harmless since the memory was not actually
     used.  On most systems this was harmless since the memory was not actually
     used.  This feature is still enabled by default for debug binaries.
     used.  This feature is still enabled by default for debug binaries.
     [1] http://clang.llvm.org/docs/AddressSanitizer.html
     [1] http://clang.llvm.org/docs/AddressSanitizer.html
+  * Fix './wraith -C' file being immediately modified when saving on
+    FreeBSD (#94)
 
 
 # 1.4.7
 # 1.4.7
   * Update server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.
   * Update server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.

+ 1 - 0
src/conf.cc

@@ -192,6 +192,7 @@ confedit()
   um = umask(077);
   um = umask(077);
 
 
   autowrote = writeconf(NULL, tmpconf.fd, CONF_COMMENT);
   autowrote = writeconf(NULL, tmpconf.fd, CONF_COMMENT);
+  fsync(tmpconf.fd);
   fstat(tmpconf.fd, &st);		/* for file modification compares */
   fstat(tmpconf.fd, &st);		/* for file modification compares */
 //  tmpconf.my_close();
 //  tmpconf.my_close();