emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/fileio.c


From: Romain Francoise
Subject: [Emacs-diffs] Changes to emacs/src/fileio.c
Date: Wed, 14 Sep 2005 16:19:40 -0400

Index: emacs/src/fileio.c
diff -c emacs/src/fileio.c:1.554 emacs/src/fileio.c:1.555
*** emacs/src/fileio.c:1.554    Wed Sep 14 02:15:34 2005
--- emacs/src/fileio.c  Wed Sep 14 20:19:38 2005
***************
*** 225,230 ****
--- 225,235 ----
     expanding file names.  This can be bound to / or \. */
  Lisp_Object Vdirectory_sep_char;
  
+ #ifdef HAVE_FSYNC
+ /* Nonzero means skip the call to fsync in Fwrite-region.  */
+ int write_region_inhibit_fsync;
+ #endif
+ 
  extern Lisp_Object Vuser_login_name;
  
  #ifdef WINDOWSNT
***************
*** 5296,5302 ****
       Disk full in NFS may be reported here.  */
    /* mib says that closing the file will try to write as fast as NFS can do
       it, and that means the fsync here is not crucial for autosave files.  */
!   if (!auto_saving && fsync (desc) < 0)
      {
        /* If fsync fails with EINTR, don't treat that as serious.  */
        if (errno != EINTR)
--- 5301,5307 ----
       Disk full in NFS may be reported here.  */
    /* mib says that closing the file will try to write as fast as NFS can do
       it, and that means the fsync here is not crucial for autosave files.  */
!   if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0)
      {
        /* If fsync fails with EINTR, don't treat that as serious.  */
        if (errno != EINTR)
***************
*** 6741,6746 ****
--- 6746,6758 ----
  shortly after Emacs reads your `.emacs' file, if you have not yet given it
  a non-nil value.  */);
    Vauto_save_list_file_name = Qnil;
+ 
+ #ifdef HAVE_FSYNC
+   DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync,
+              doc: /* *Non-nil means don't call fsync after saving files.
+ Enabling this variable may result in data loss!  */);
+   write_region_inhibit_fsync = 0;
+ #endif
  
    defsubr (&Sfind_file_name_handler);
    defsubr (&Sfile_name_directory);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]