You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Stas Bekman <st...@stason.org> on 2002/04/17 10:53:28 UTC

[patch unix/readwrite.c] a bug fix for apr_file_read

without this patch, while(!apr_file_eof(...)) spins for unbuffered fh. 
I've visually checked apr_file_read in win and os2 implementations, but 
please verify for a similar bug.

Index: srclib/apr/file_io/unix/readwrite.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/unix/readwrite.c,v
retrieving revision 1.77
diff -u -r1.77 readwrite.c
--- srclib/apr/file_io/unix/readwrite.c	15 Mar 2002 02:25:00 -0000	1.77
+++ srclib/apr/file_io/unix/readwrite.c	17 Apr 2002 08:43:57 -0000
@@ -207,6 +207,7 @@
  #endif
          *nbytes = bytes_read;
          if (rv == 0) {
+            thefile->eof_hit = TRUE;
              return APR_EOF;
          }
          if (rv > 0) {


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: [patch unix/readwrite.c] a bug fix for apr_file_read

Posted by Jeff Trawick <tr...@attglobal.net>.
Stas Bekman <st...@stason.org> writes:

> without this patch, while(!apr_file_eof(...)) spins for unbuffered
> fh. ...

Committed...  Thanks!

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...