delorie.com/archives/browse.cgi | search |
From: | cgf AT cygnus DOT com (Christopher Faylor) |
Subject: | Re: Error in dup??? |
13 Nov 1998 20:50:13 -0800 : | |
Message-ID: | <19981113232513.A6327.cygnus.cygwin32.developers@cygnus.com> |
References: | <19981114041054 DOT 582 DOT rocketmail AT send1b DOT yahoomail DOT com> |
Mime-Version: | 1.0 |
To: | earnie_boyd AT yahoo DOT com, cygwin developers <cygwin32-developers AT cygnus DOT com> |
On Fri, Nov 13, 1998 at 08:10:54PM -0800, Earnie Boyd wrote: >---Corinna Vinschen <corinna DOT vinschen AT cityweb DOT de> wrote: ><snip> >> ... >> 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. No. It should be true in all cases. Dup should always choose the lowest fd. -chris
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |