emacs-devel
[Top][All Lists]
Advanced

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

Re: Making fsync() optional


From: Richard M. Stallman
Subject: Re: Making fsync() optional
Date: Tue, 13 Sep 2005 11:55:38 -0400

    Would people be conceptually opposed to making the fsync() call optional
    in Fwrite_region?  Calling it after each write

It is not called after each write, just once at the end of writing the
whole file.

This is very important for safety.  Without this, you can type C-x
C-s, and see the command finish, and see the message that the file has
been written, but you can still lose it all if the system crashes
after that.

However, I would not mind adding a flag to turn it off, as long as the
doc string of that flag warns that this is dangerous.

  It also forces the disk to spin up on laptops (even with laptop
    mode and friends).

It has to do that anyway.  I don't want it to wait a minute before it
writes the file!

    Of course calling fsync() is safer if the system goes down right after
    saving the file, but for systems with uninterruptible power, it doesn't
    matter.

A power failure is not the only cause of crashes.




reply via email to

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