a question on open() and lseek()

HO paul at whuts.UUCP
Wed Apr 16 13:53:10 AEST 1986


> 	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



More information about the Comp.unix.wizards mailing list