a question on open() and lseek()
moi%brandeis.csnet at csnet-relay.arpa
moi%brandeis.csnet at csnet-relay.arpa
Mon Apr 14 00:23:04 AEST 1986
The manual page for "open()" mentions that one of the flags one
can specify with the call is O_APPEND. It's supposed to request
that all "write()"s be appended to the end of the file. 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.
Moises Lejter
moi%brandeis at csnet-relay
More information about the Comp.unix.wizards
mailing list