A libio patch

H.J. Lu hjl@lucon.org
Sat Oct 31 13:17:00 GMT 1998


> 
> 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)



More information about the Libc-hacker mailing list