[squeak-dev] Adding fsync() call to the primitiveFileFlush prim ?

tim Rowledge tim at rowledge.org
Sun May 22 23:08:33 UTC 2016

> On 22-05-2016, at 12:16 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> Make sure it makes backup copies that don't trash the existing backup copies, before it saves over the image. The plug could get pulled at any point.  Only rename is quick enough and repairable enough to consider atomic.

The good news is that it’s not the image that needs to be saved since that is kept prisitine, but the project file(s) which are much, much smaller. So I should be able to keep a simple backup directory, save there occasionally and then.. well I dunno. If a user does a ‘normal save’ then I suppose one should delete the backups to avoid confusion in the future. I guess checking that directory on startup and telling the user that there are possible projects copies? Choosing when to do a backup save is an interesting question too; clearly not when the code is being run since the interruption would be most unwelcome in a Pacman tournament. One could go for the total save-on-every action saving of Pages etc but seems like it might cause too much delays. I’ll have to try measuring it I suppose.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
If the code and the comments disagree, then both are probably wrong

More information about the Squeak-dev mailing list