This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12351] New: non-conformance in fgetc behavior with eof flag


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]