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

 
 

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

Submitter:  Taylor R. Campbell <riastradh>
Submitted:  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:  riastradh Originator Name: 
Open/Closed:  Open
Keywords: 
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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>
Group Member
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>
Group Member

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    History

    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.16.
    Corresponding source code