a question on open() and lseek()

John Owens jso at edison.UUCP
Sat Apr 19 06:51:34 AEST 1986


> 	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 at 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 at 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



More information about the Comp.unix.wizards mailing list