if you can loose N seconds/bytes of log, perhaps you can sync only every N seconds/bytes ..
you can also mount your mmc in sync mode ..
Do you use ext filesystem on your mmc ? I had problems with corrupted fat filesystem when I disconnected power, with ext3 I don't have this problem anymore.
On Thursday 27 April 2006 02:16, email@example.com wrote:
> I am using the gumstix to read data from the serial port, and logging the
> data to a file on the mmc card. The datalogging program starts at boot
> time. There is no console , and therefore no way to gracefully close the
> files and exit the program. I see only two ways to stop the program: remove
> power or remove the mmc card.
> Doing either messes up the file. If I kill the process then the file is
> fine, but I can't do that without the console. I'm content to lose the last
> part of the file, but removing power messes up the whole file.
> Is there some simple way to deal with this problem?
Close, force sync, and reopen the file after every line write.
Patrick "Diablo-D3" McFarland || firstname.lastname@example.org
"Computer games don't affect kids; I mean if Pac-Man affected us as kids,
we'd all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music." -- Kristian Wilson, Nintendo,
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
gumstix-users mailing list