bugMIT/GNU Scheme - Bugs: bug #27565, Edwin and microcode write (fasl,...


bug #27565: Edwin and microcode write (fasl, autosave, &c.) files non-atomically

Submitted by:  Taylor R. Campbell <riastradh>
Submitted on:  Wed 30 Sep 2009 07:18:31 PM UTC  
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Suboptimal behavior
Status:  None Privacy:  Public
Assigned to:  Taylor R. Campbell <riastradh> Originator Name: 
Open/Closed:  Open

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 13 Nov 2009 10:15:37 PM UTC, comment #1: 

This affects FASDUMP too.  In general, for whole-file writes, Scheme should (on Unix at least) always write to a temporary file and then rename it over the permanent file.  (Does Windows have a way to write a file atomically, at worst leaving a temporary file dangling?)

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.
Wed 30 Sep 2009 07:18:31 PM UTC, original submission:  

Edwin autosaves files by overwriting the autosave file in place.  If power is lost during this process, the data on disk may reflect neither the old autosave file nor the whole contents of the buffer.  Instead, Edwin should write to a temporary pathname, and when it is done, rename it to the permanent autosave file pathname.

(Today my laptop caught GNU Emacs in the middle of autosaving a file when its battery ran out of juice!  I was not happy to find the autosave file truncated, although fortunately in this case I had all the data elsewhere.)

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by riastradh (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-11-13 riastradh Categoryedwin => None
        SummaryEdwin doesn\'t autosave atomically => Edwin and microcode write (fasl, autosave, &c.) files non-atomically

    Back to the top

    Powered by Savane 3.5