Regarding Accessing a single file by two process.
I have written a 2 functions to read & write a file.
There is a single file which will be read or written by different processes.
So how to avoid the process to read or write the file when some other process is performing the task on that file.
or processes can read the file but if one process is writing that file at that time no other process should read it or write it.
Please explain with example.
"QSystemSemaphore":http://doc.qt.nokia.com/latest/qsystemsemaphore.html (examples inside)
For more informations about your problem see "Readers-Writers-Problem":http://en.wikipedia.org/wiki/Readers-writers_problem
Closing this one as a duplicate of http://developer.qt.nokia.com/forums/viewthread/7084/.
... and moved to general and desktop section as this is definitely not for the guru group.