wez             Mon Jul 18 09:28:26 2005 EDT

  Modified files:              
    /php-src/main/streams       plain_wrapper.c 
  Log:
  Apparently our pipe detection code just above this isn't foolproof.
  Catch it here.
  
  
http://cvs.php.net/diff.php/php-src/main/streams/plain_wrapper.c?r1=1.49&r2=1.50&ty=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.49 
php-src/main/streams/plain_wrapper.c:1.50
--- php-src/main/streams/plain_wrapper.c:1.49   Sun Jul 17 14:39:24 2005
+++ php-src/main/streams/plain_wrapper.c        Mon Jul 18 09:28:24 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: plain_wrapper.c,v 1.49 2005/07/17 18:39:24 helly Exp $ */
+/* $Id: plain_wrapper.c,v 1.50 2005/07/18 13:28:24 wez Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -208,6 +208,12 @@
                        stream->flags |= PHP_STREAM_FLAG_NO_SEEK;
                } else {
                        stream->position = lseek(self->fd, 0, SEEK_CUR);
+#ifdef ESPIPE
+                       if (stream->position == (off_t)-1 && errno == ESPIPE) {
+                               stream->position = 0;
+                               stream->is_pipe = 1;
+                       }
+#endif
                }
        }
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to