This is the mail archive of the libc-hacker@sourceware.cygnus.com 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]

Re: A libio patch


> 
> hjl@lucon.org (H.J. Lu) writes:
> 
> > Wed Oct 28 19:29:29 1998  H.J. Lu  <hjl@gnu.org>
> > 
> > 	* libio/iogetline.c ((_IO_getline_info): Don't read again if
> > 	there is nothing to read.
> 
> This cannot be right.  If the input stream is line buffered the read
> will return a short input and and if we have a deliminiter != '\n' we
> return a wrong value.
> 
> Please show me an example program showing the problem.
> 

It is buried inside the VSX-PCT code. Basically it opens a pipe
between 2 processes. The writer writes "foo" and the reader uses fgets
to read the pipe. It expects fgets returns "foo", not NULL.

-- 
H.J. Lu (hjl@gnu.org)


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