This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: A libio patch
- To: drepper@cygnus.com
- Subject: Re: A libio patch
- From: hjl@lucon.org (H.J. Lu)
- Date: Sat, 31 Oct 1998 13:09:39 -0800 (PST)
- Cc: libc-hacker@cygnus.com
>
> 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)