Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!decvax!decwrl!ucbvax!info-vax From: H_Eidnes%vax.runit.unit.uninett@NTA-VAX.ARPA (H}vard Eidnes) Newsgroups: mod.computers.vax Subject: Re: Vax C V2.0 open bug Message-ID: <647:H_Eidnes@vax.runit.unit.uninett> Date: Tue, 26-Nov-85 02:44:35 EST Article-I.D.: vax.647:H_Eidnes Posted: Tue Nov 26 02:44:35 1985 Date-Received: Wed, 27-Nov-85 00:15:58 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 17 Approved: info-vax@sri-kl.arpa > > > Any program that relies on getting a particular file descriptor at a > > > particular point in its execution is broken. ... > > > > Well, the fact remains that the semantics that you get the > > *lowest free* file descriptor is *documented* in every Unix > > Programming Manual (at least all that I have come across...), > > ... The rule you cite is > not mentioned in the description of the open system call (vol 1, open(2)). Well, now I've learned my lesson. Don't write what you *think* is in the manual. Write what *is* in the manual (and look before you write :-) Well - seems I mixed it up the behaviour of open(2) and dup(2). (It is documented that dup(2) returns the lowest free file descriptor.) Sorry to have to trouble you all with this mistake.