public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/26257] New: Repeated ftello calls result in lseek system calls
@ 2020-07-17  7:06 fweimer at redhat dot com
  2020-07-21  2:55 ` [Bug stdio/26257] " carlos at redhat dot com
  2020-07-21  6:05 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2020-07-17  7:06 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26257

            Bug ID: 26257
           Summary: Repeated ftello calls result in lseek system calls
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

If fseeko is never called on a stream, all ftello calls result in lseek system
calls because ftello never updates the cached file offset.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug stdio/26257] Repeated ftello calls result in lseek system calls
  2020-07-17  7:06 [Bug stdio/26257] New: Repeated ftello calls result in lseek system calls fweimer at redhat dot com
@ 2020-07-21  2:55 ` carlos at redhat dot com
  2020-07-21  6:05 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: carlos at redhat dot com @ 2020-07-21  2:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26257

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com

--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #0)
> If fseeko is never called on a stream, all ftello calls result in lseek
> system calls because ftello never updates the cached file offset.

It this required because the FILE handle remains inactive? Thus there is
allowed an underlying use of the file descriptor until the activating action?

See:
https://sourceware.org/glibc/wiki/File%20offsets%20in%20a%20stdio%20stream%20and%20ftell

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug stdio/26257] Repeated ftello calls result in lseek system calls
  2020-07-17  7:06 [Bug stdio/26257] New: Repeated ftello calls result in lseek system calls fweimer at redhat dot com
  2020-07-21  2:55 ` [Bug stdio/26257] " carlos at redhat dot com
@ 2020-07-21  6:05 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2020-07-21  6:05 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26257

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Carlos O'Donell from comment #1)
> (In reply to Florian Weimer from comment #0)
> > If fseeko is never called on a stream, all ftello calls result in lseek
> > system calls because ftello never updates the cached file offset.
> 
> It this required because the FILE handle remains inactive? Thus there is
> allowed an underlying use of the file descriptor until the activating action?
> 
> See:
> https://sourceware.org/glibc/wiki/
> File%20offsets%20in%20a%20stdio%20stream%20and%20ftell

I don't see a compelling justification why ftello can't update the cache if the
lseek system call succeeds.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-21  6:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17  7:06 [Bug stdio/26257] New: Repeated ftello calls result in lseek system calls fweimer at redhat dot com
2020-07-21  2:55 ` [Bug stdio/26257] " carlos at redhat dot com
2020-07-21  6:05 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).