From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: B20 patch [was Re: Error in dup???] 14 Nov 1998 09:24:01 -0800 Message-ID: <19981114115819.A23309.cygnus.cygwin32.developers@cygnus.com> References: <19981114041054 DOT 582 DOT rocketmail AT send1b DOT yahoomail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Corinna Vinschen , cygwin32-developers AT cygnus DOT com On Sat, Nov 14, 1998 at 05:09:04PM +0100, Corinna Vinschen wrote: >Hello, > >I have found the error, which leads to the incorrect dup() handling >in tcsh. The member variable hinfo::first_fd_for_open is set to 3 >in the constructor of hinfo, which give the incorrect later results. >Initializing to 0 let it work as defined in the standards. Does this fix the problem, perhaps? Index: hinfo.cc =================================================================== RCS file: /cvs/cvsfiles/devo/winsup/hinfo.cc,v retrieving revision 1.65 diff -u -p -r1.65 hinfo.cc --- hinfo.cc 1998/10/23 07:23:54 1.65 +++ hinfo.cc 1998/11/14 16:57:49 @@ -500,6 +500,7 @@ hinfo::de_linearize_fd_array (LPBYTE buf buf += len; debug_printf ("len %d", buf - obuf); } + first_fd_for_open = 0; return buf; }