Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site edison.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!whuxl!whuxlm!akgua!mcnc!ncsu!uvacs!edison!jso From: jso@edison.UUCP (John Owens) Newsgroups: net.unix-wizards Subject: Re: a question on open() and lseek() Message-ID: <691@edison.UUCP> Date: Fri, 18-Apr-86 15:51:34 EST Article-I.D.: edison.691 Posted: Fri Apr 18 15:51:34 1986 Date-Received: Mon, 21-Apr-86 08:03:17 EST References: <2594@brl-smoke.ARPA> Organization: General Electric Company, Charlottesville, VA Lines: 23 > The manual page for "open()" mentions that one of the flags one > can specify with the call is O_APPEND. [...] 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 ); > > Moises Lejter > moi%brandeis@csnet-relay 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. John Owens edison!jso%virginia@CSNet-Relay.ARPA General Electric Company Phone: (804) 978-5726 Factory Automation Products Division Compuserve: 76317,2354 houxm!burl!icase!uvacs ...!{ decvax!mcnc!ncsu!uvacs }!edison!jso gatech!allegra!uvacs