in reply to Multiple Acess to a single file

Sachu,

Why do you want to store this state information in a single file? I think the solutions get a lot easier if you look at a broader array of structures.

First of all in order to do what you are saying you need to use the seek function to move to a particular place in a file. Secondly you would need to make sure that each record (i.e. test status pair) had a fixed length so that you could navigate easily through the file. You would - as you guess - need to deal with the issues of file locking. File locking is operating system specific and that is always best avoided.

I can see at least three better options: