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

Guy Harris guy at auspex.UUCP
Tue Dec 19 10:12:39 AEST 1989


>Which means that it can't be guaranteed to know the current EOF position
>if there are multiple writers.

Correct.

>The server knows the EOF position, of course, but doesn't accept "append"
>requests.  With a stateless protocol the possibility would then exist for
>a request to succeed, but the ack back to the client to be lost resulting
>it a retry on the request.  If another "append" request intervened before
>the retry, the write would be duplicated in different places.

No, since the "write" request contains the position in the file at which
the "write" is to occur; instead, you run the risk of having your data
overwritten by another writer.  If the server *did* accept an "append"
request" that implicitly wrote to the end of the file, a retry would run
the risk of causing the write to be duplicated in different places.



More information about the Comp.unix.questions mailing list