“Darel Cullen” <email@example.com> wrote in message
Yes, I had added that too - always good to know anything that is waiting
in some buffer somewhere will flush out. It is a bit of a shame that there
is no way to prevent the user from pressing the power button and ending up
with an inconsistent filesystem (because we have files that refer to each
other). It would be nice to be able to do as windows and catch the power
off as an interrupt and then force a controlled shutdown.
You can, some motherboard use the NMI interrupt to notify of powerfailure.
You only get a few ms before power goes out though.
Thanks for your help.
“Kevin Miller” <> firstname.lastname@example.org> > wrote in message
news:dll7to$7h2$> email@example.com> …
I like to give a “sync” before running shutdown, too. Just makes me feel
“Mario Charest” firstname.lastname@example.org wrote in message
news:dlki81$llh$> email@example.com> …
“Darel Cullen” <> firstname.lastname@example.org> > wrote in message
news:dlka53$gfe$> email@example.com> …
We have noticed a problem when a PC is shutdown with the power button
that certain files can be corrupted on restart, is there a way to
When we start up we run
chkfsys -P -q -s -r /
we use codebase which stores data in two files, .dbf datafiles and .mdx
index files. we have noticed that if these files are being written to
whilst there is a sudden power loss or the use turns off the pc with
the power button these files can be out of sync or corrupted.
Any easy solutions to this?
I thought about implementing a safe shutdown a bit like windows has,
that runs a shutdown -b ?
Yes shutdown would to the trick, and it would be even better if you
program respond to SIGPWR and make sure all data are flushed.
The other option is to open the files with flash tell Fsys to alwys
write the data to disk and not cache the writes.