From: earnie_boyd AT yahoo DOT com (Earnie Boyd) Subject: Re: Error in dup??? 13 Nov 1998 20:20:13 -0800 Message-ID: <19981114041054.582.rocketmail.cygnus.cygwin32.developers@send1b.yahoomail.com> Reply-To: earnie_boyd AT yahoo DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: cygwin developers ---Corinna Vinschen wrote: > ... > close(0); > (void) dup(foo_fd); > ... > It appears that the coder is assuming that dup will use the first available file descriptor. This may not be true in all cases. > ... > close(0); > (void) dup2(foo_fd, 0); > ... For systems that support dup2 this would be more correct. == - \\||// -------------------o0O0--Earnie--0O0o------------------- -- earnie_boyd AT yahoo DOT com -- -- http://www.freeyellow.com/members5/gw32/index.html -- ----------------------ooo0O--O0ooo---------------------- PS: Newbie's, you should visit my page. _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com