Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!glacier!hplabs!sdcrdcf!ism780c!tim From: tim@ism780c.UUCP Newsgroups: net.unix-wizards Subject: Re: a question on open() and lseek() Message-ID: <1968@ism780c.UUCP> Date: Wed, 23-Apr-86 15:14:47 EST Article-I.D.: ism780c.1968 Posted: Wed Apr 23 15:14:47 1986 Date-Received: Sat, 26-Apr-86 04:07:49 EST References: <2594@brl-smoke.ARPA> <691@edison.UUCP> Reply-To: tim@ism780c.UUCP (Tim Smith) Organization: Interactive Systems Corp., Santa Monica, CA Lines: 17 In article <691@edison.UUCP> jso@edison.UUCP (John Owens) writes: >> 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 ); > >Because many versions of UNIX do not support the O_APPEND flag; it's >a fairly recent innovation. All versions since v7 (at least that I'm >aware of) should support the open/lseek method. How about doing both? Unixes that do not recognize O_APPEND will probably ignore it, and unixes that do will ignore the lseek. -- Tim Smith sdcrdcf!ism780c!tim || ima!ism780!tim || ihnp4!cithep!tim