[comp.sys.mac.programmer] Missing files after system crash

bwb@andante.UUCP (Bruce Ballard) (02/10/90)

Can someone fill me in:

The problem: Your app writes one or more files,
then a static charge or a tripping
over the power cord causes the machine to go down.
Upon reboot, your files are missing from the desktop.

The reason: ??

The solution: ??

Thanks in advance.

Bruce Ballard
bwb@allegra.att.com

usenet@cps3xx.UUCP (Usenet file owner) (02/10/90)

In article <29750@andante.UUCP> bwb@andante.UUCP (Bruce Ballard) writes:
>The problem: Your app writes one or more files,
>then a static charge or a tripping
>over the power cord causes the machine to go down.
>Upon reboot, your files are missing from the desktop.
>
>The reason: ??

    The volume buffer is held in memory until such a time the OS deems
    the data worthy enough to write out (or something like that). 

>The solution: ??

    Use FlushVolume (or whatever it is, IM not handy at the moment...)
    to put this info on the disk.

    Any other comments on this problem?  When does the OS decide to
    write the buffer?  This has always been greek to me...

Robert Cook
"cookr@cpsin1.msu.edu"

Disclaimers:  I may not always say the right things, but at least what I
              say is mine, and no one else.

tim@hoptoad.uucp (Tim Maroney) (02/11/90)

In article <29750@andante.UUCP> bwb@andante.UUCP (Bruce Ballard) writes:
>Can someone fill me in:
>
>The problem: Your app writes one or more files,
>then a static charge or a tripping
>over the power cord causes the machine to go down.
>Upon reboot, your files are missing from the desktop.
>
>The reason: ??

Your application didn't do a FlushVol after writing the files.

>The solution: ??

Make it do a FlushVol (PBFlushVol).
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"A book is the product of a contract with the Devil that inverts the Faustian
 contract, he'd told Allie.  Dr Faustus sacrificed eternity in return for two
 dozen years of power; the writer agrees to the ruination of his life, and
 gains (but only if he's lucky) maybe not eternity, but posterity, at least.
 Either way (this was Jumpy's point) it's the Devil who wins."
	-- Salman Rushdie, THE SATANIC VERSES