reassign 130557 zlib1g
thanks

On Wed, Jan 23, 2002 at 03:32:00PM +0000, Thomas Leonard <[EMAIL PROTECTED]> 
wrote:
> Package: libxml2
> Version: 2.4.13-1
> Severity: normal
> 
> When xmlParseFile hits end-of-file, it keeps trying to read. Only after read()
> has failed multiple times does it actually stop. This is a problem when 
> reading
> from standard-input, since it may be necessary to press Ctrl-D six times or
> more to end the input!
> 
> Sample program:
> 
>       #include <parser.h>
> 
>       int main(void)
>       {
>               xmlDoc *doc;
> 
>               doc = xmlParseFile("-");
> 
>               return 0;
>       }
> 
> Test it with:
> 
> $ gcc -o tree tree.c `xml2-config --libs --cflags`
> $ ./tree
> 
> Enter anything here (valid XML or not). Ctrl-D must be pressed several
> times before the program terminates.

Today, I finally decided myself to look into this long-standing well
known bug, and realized this bug is actually zlib related. You can
reproduce the exact same behaviour with the following code snippet :

#include <zlib.h>

int main(void) {
  gzFile fd;
  char buffer[256];
  fd = gzdopen(dup(0), "rb");
  while(gzread(fd, buffer, 256));
  gzclose(fd);
  return 0;
}

Test it with:

$ gcc -o test test.c -lz
$ ./test

I'm reassigning to zlib

Cheers,

Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to