[PATCH v2] ftell: seek to end only when there are unflushed bytes (BZ #17647)
Siddhesh Poyarekar
siddhesh@redhat.com
Wed Nov 26 08:56:00 GMT 2014
On Tue, Nov 25, 2014 at 03:14:15PM -0500, Rich Felker wrote:
> I haven't read these patches in detail, but are you sure this matters?
> I think the "active handle" rules forbid truncating a file while a
> stdio stream is the active handle, but I may be mistaken.
Apparently, they don't. The active handle rules seem to only forbid
operations that modify the file offset and ftruncate does not modify
the file offset. Instead, ftell ends up modifying the file offset by
explicitly seeking to the end of file when it is not immediately
required, thus breaking expectations of what the offset returned
should be.
Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20141126/20c94f35/attachment.sig>
More information about the Libc-alpha
mailing list