Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 exptools; site whuts.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!houxm!whuxl!whuts!paul From: paul@whuts.UUCP (HO) Newsgroups: net.unix-wizards Subject: Re: a question on open() and lseek() Message-ID: <702@whuts.UUCP> Date: Tue, 15-Apr-86 22:53:10 EST Article-I.D.: whuts.702 Posted: Tue Apr 15 22:53:10 1986 Date-Received: Thu, 17-Apr-86 01:26:55 EST References: <2594@brl-smoke.ARPA> Organization: AT&T Bell Laboratories Lines: 15 > is there any reason to use the sequence: > f = open( file, O_WRONLY ); > lseek( f, 0, L_XTND ); > instead of the single call: > f = open( file, O_WRONLY | O_APPEND ); > > I saw the sequence used in a section of code where the single > call would make sense. > I think pre-System III's open has only read, write, and read/write for open(), and the file descriptor returned is used for lseek. Starting from System III, open() recognizes more flags. Paul Ho