fopen ( ..., "a" ) --- how does the "a" work?

6600pete at hub.UUCP 6600pete at hub.UUCP
Thu Dec 7 06:32:33 AEST 1989


When one opens a file under *most* flavors of UN*X (I realize this is
the kind of thing that will be system-dependent, though it oughtn't)
with fopen ( ..., "a" ), the file mark is supposed to be moved to EOF
before every write. Now, how is this done? Are there two system calls,
one to move the file mark and one to do the write, or is there one
system call, "append"? If the latter, then this is an easier solution
for a problem I have than figuring out how to do record locking.
-------------------------------------------------------------------------------
Pete Gontier   : InterNet: 6600pete at ucsbuxa.ucsb.edu, BitNet: 6600pete at ucsbuxa
Editor, Macker : Online Macintosh Programming Journal; mail for subscription
Hire this kid  : Mac, DOS, C, Pascal, asm, excellent communication skills



More information about the Comp.unix.questions mailing list