Offset returned using lseek command after write operation is wrong on unix System
Hello,
Depending on the incoming data stream, the data is written to a file using basic unix commands such as open,write and lseek. One in a hundred time the offset returned by lseek is incorrect after the data has been written into the file. Like example below the offset after write operation should have been 507160. Due to which the data at the end of the file has been lost. Are there limitations in using write and lseek functions(as this is happening at random not for all files).
Following are the prints:
dataLogging : Received Data Size = 34408
getCorrespondingFd : Currently Open FD is 6 For File Type 1
Printing data to Offset 472752
dataLogging : Write Call is successfull
CurrentOffset 502024
dataLogging : Write Call is successfull
|