This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH v2] ftell: seek to end only when there are unflushed bytes (BZ #17647)
- From: Rich Felker <dalias at libc dot org>
- To: libc-alpha at sourceware dot org
- Date: Tue, 25 Nov 2014 15:14:15 -0500
- Subject: Re: [PATCH v2] ftell: seek to end only when there are unflushed bytes (BZ #17647)
- Authentication-results: sourceware.org; auth=none
- References: <20141125155404 dot GO12197 at spoyarek dot pnq dot redhat dot com>
On Tue, Nov 25, 2014 at 09:24:04PM +0530, Siddhesh Poyarekar wrote:
> Upon re-reading the standard, it seems like the intervening
> fseek/fflush should not be required since ftruncate does not change
> the file offset. So this is a bug and here's an updated patch:
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.