From: corinna DOT vinschen AT cityweb DOT de (Corinna Vinschen) Subject: B20 patch [was Re: Error in dup???] 14 Nov 1998 08:17:03 -0800 Message-ID: <364DAB20.139EFDBF.cygnus.cygwin32.developers@cityweb.de> References: <19981114041054 DOT 582 DOT rocketmail AT send1b DOT yahoomail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Christopher Faylor , cygwin32-developers AT cygnus DOT com 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. Regards, Corinna ChangeLog: ---------- Sat Nov 14 17:03:00 1998 Corinna Vinschen * winsup.h: Changed constructor of class hinfo, to initialize member variable first_fd_for_open to 0 instead of 3. ----- snip ----- --- winsup.h.orig Sat Nov 14 16:44:32 1998 +++ winsup.h Sat Nov 14 16:46:10 1998 @@ -145,7 +145,7 @@ class hinfo public: size_t size; void clearout (int fd); - hinfo () {first_fd_for_open = 3;} + hinfo () {first_fd_for_open = 0;} int extend (int howmuch); void fixup_after_fork (); fhandler_base *build_fhandler (int fd, DWORD dev, const char *name,