public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12351] New: non-conformance in fgetc behavior with eof flag
@ 2010-12-27 23:21 random832 at fastmail dot us
2011-05-29 23:23 ` [Bug libc/12351] " drepper.fsp at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: random832 at fastmail dot us @ 2010-12-27 23:21 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12351
Summary: non-conformance in fgetc behavior with eof flag
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: random832@fastmail.us
The C standard says "If the end-of-file indicator for the stream is set, or if
the stream is at end-of-file, the end-of-file indicator for the stream is set
and the fgetc function returns EOF."
glibc seems to ignore the end-of-file indicator, this can be shown by typing a
ctrl-d on a blank line on a tty, or by repeatedly calling fgetc on a file which
it has reached the end of and which another process is appending to.
See also (not mine)
http://sourceware.org/glibc/wiki/Feedback#fgetc_function_.2BAC8_compliance_to_standard
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/12351] non-conformance in fgetc behavior with eof flag
2010-12-27 23:21 [Bug libc/12351] New: non-conformance in fgetc behavior with eof flag random832 at fastmail dot us
@ 2011-05-29 23:23 ` drepper.fsp at gmail dot com
2011-05-30 3:49 ` random832 at fastmail dot us
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-05-29 23:23 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12351
Ulrich Drepper <drepper.fsp at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
--- Comment #1 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-05-29 23:22:32 UTC ---
I don't know what you see. You have to provide a self-contained small example
of what you think is a problem. Then you can reopen the bug.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/12351] non-conformance in fgetc behavior with eof flag
2010-12-27 23:21 [Bug libc/12351] New: non-conformance in fgetc behavior with eof flag random832 at fastmail dot us
2011-05-29 23:23 ` [Bug libc/12351] " drepper.fsp at gmail dot com
@ 2011-05-30 3:49 ` random832 at fastmail dot us
2011-05-30 13:17 ` drepper.fsp at gmail dot com
2014-06-27 14:04 ` fweimer at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: random832 at fastmail dot us @ 2011-05-30 3:49 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12351
--- Comment #2 from random832 at fastmail dot us 2011-05-30 03:48:36 UTC ---
The problem is, an example _cannot_ be self-contained - it requires interactive
tty input or a second process appending to the file.
The example code at the link is sufficient (if modified to read stdin instead
of a file), if you type the EOF character [ctrl-D on most systems by default],
it will correctly report EOF once, but then it will carry on reading text typed
after that when it should (according to standard) continue reporting EOF
indefinitely until clearerr is called.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/12351] non-conformance in fgetc behavior with eof flag
2010-12-27 23:21 [Bug libc/12351] New: non-conformance in fgetc behavior with eof flag random832 at fastmail dot us
2011-05-29 23:23 ` [Bug libc/12351] " drepper.fsp at gmail dot com
2011-05-30 3:49 ` random832 at fastmail dot us
@ 2011-05-30 13:17 ` drepper.fsp at gmail dot com
2014-06-27 14:04 ` fweimer at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-05-30 13:17 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12351
--- Comment #3 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-05-30 13:17:05 UTC ---
(In reply to comment #2)
> The problem is, an example _cannot_ be self-contained - it requires interactive
> tty input or a second process appending to the file.
And what keeps you from writing such a code? Call fork, has the second process
feed a file descriptor etc. I haven't seen any indication of a problem and the
descriptor is absolutely not sufficient to reproduce any.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/12351] non-conformance in fgetc behavior with eof flag
2010-12-27 23:21 [Bug libc/12351] New: non-conformance in fgetc behavior with eof flag random832 at fastmail dot us
` (2 preceding siblings ...)
2011-05-30 13:17 ` drepper.fsp at gmail dot com
@ 2014-06-27 14:04 ` fweimer at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 14:04 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=12351
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-27 14:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-27 23:21 [Bug libc/12351] New: non-conformance in fgetc behavior with eof flag random832 at fastmail dot us
2011-05-29 23:23 ` [Bug libc/12351] " drepper.fsp at gmail dot com
2011-05-30 3:49 ` random832 at fastmail dot us
2011-05-30 13:17 ` drepper.fsp at gmail dot com
2014-06-27 14:04 ` 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).