Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 96393 invoked by uid 500); 6 Dec 2001 08:12:27 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 96382 invoked from network); 6 Dec 2001 08:12:26 -0000 Message-ID: <3C0F2873.4000102@stason.org> Date: Thu, 06 Dec 2001 16:12:35 +0800 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011012 X-Accept-Language: en-us MIME-Version: 1.0 To: dev@apr.apache.org Subject: [patch srclib/apr/file_io/unix/filedup.c] broken dup Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N After dupping the fd, the first read was getting 0 as a first char. Of course other platforms should probably also fixed. Index: srclib/apr/file_io/unix/filedup.c =================================================================== RCS file: /home/cvspublic/apr/file_io/unix/filedup.c,v retrieving revision 1.35 diff -u -r1.35 filedup.c --- srclib/apr/file_io/unix/filedup.c 2001/11/21 04:21:03 1.35 +++ srclib/apr/file_io/unix/filedup.c 2001/12/06 07:51:33 @@ -89,6 +89,9 @@ } /* this is the way dup() works */ (*new_file)->blocking = old_file->blocking; + + (*new_file)->ungetchar = old_file->ungetchar; + /* apr_file_dup() clears the inherit attribute, user must call * apr_file_set_inherit() again on the dupped handle, as necessary. */ -- _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/