[Bug 1899] New: Wrong file pointer position when reading a file oppened with O_APPEND flag...
Wine Bugs
wine-bugs at winehq.com
Fri Dec 19 06:59:50 CST 2003
http://bugs.winehq.com/show_bug.cgi?id=1899
Summary: Wrong file pointer position when reading a file oppened
with O_APPEND flag...
Product: Wine
Version: unspecified
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: wine-files
AssignedTo: wine-bugs at winehq.com
ReportedBy: mauro at ose.com.br
The behavior of file pointer differs between read and write operations when the
file is opened with "O_APPEND" flag.
For read operations, the pointer starts on the beggining of the file; and, for
write operations, the pointer is forwarded to the end of file.
Since november version of Wine this is not happening any more.
I have an application that consults a file before trying to store some
information on it.
On the read procedure, nothing is got because the pointer is already on the end
of file. But this should happen only when an write operation is performed.
The opening options for the file are as follows: "fd = open(NomeArq, O_APPEND |
O_RDWR | O_BINARY, S_IREAD | S_IWRITE );".
I need to agree that this should not be the right flags for a reading
procedure, but it served to found this problem.
You can try with any file.
Store some information and close it.
Open it again with the flags above, and try to read the same information.
You will get nothing because the file pointer will be already pointing to the
end of the file.
I hope to be clear enough about the problem.
Please feel free to contact me if you need additional information.
Best regards,
Mauro.
--
Configure bugmail: http://bugs.winehq.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list