Date: Tue, 24 Sep 1996 19:11:21 +0200 (IST) From: Eli Zaretskii To: DJ Delorie Cc: djgpp-workers AT delorie DOT com Subject: Re: alpha 960919 In-Reply-To: <199609200412.AAA27520@delorie.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 20 Sep 1996, DJ Delorie wrote: > Has anyone looked at the dup2(0,50) bug yet? How about the patch below? Can whoever reported the problem please test this and see if it solves the bug? *** src/libc/posix/unistd/dup2.c~0 Mon Feb 27 00:43:08 1995 --- src/libc/posix/unistd/dup2.c Tue Sep 24 19:01:44 1996 *************** *** 1,6 **** --- 1,7 ---- /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #include + #include #include #include #include *************** *** 12,17 **** --- 13,19 ---- __dpmi_regs r; if (fd == newfd) return newfd; + __file_handle_set(newfd, __file_handle_modes[fd] ^ (O_BINARY|O_TEXT)); r.h.ah = 0x46; r.x.bx = fd; r.x.cx = newfd;