Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Partial files being create?: Page 1 of 12 (12 Items)
   
Partial files being create?  
I found an unexpected and disturbing issue relating to the QNX 4 file system.  When writing to a file, and then powering
 down during the write, on powerup a partial file is created!  I was expecting the file name to be present, but with a 
zero length.  I would expect that NONE of the data written to the file would be committed until the file was closed.  
Unfortunately, my program was writing to /.boot at the time of the powerdown.  On repowering, the IPL finds the image 
signature in the first 8Kbytes, thinks its good, loads and executes it.

In our application, the system must be tolerant of unexpected powerdowns.  I'm developing under QNX 6.5.0 and using the 
low-level C open-write-close functions.  Is there a way to prevent partial files under this condition?