I have multiple threads attempting to log to the same file.
Each thread has a FILE *
that points to the file. The FILE *
s were opened in append ('a') mode and are using line buffering.
Opening multiple FILE *
to the same file within the same process is implementation defined according to ANSI C.
Would anyone happen to know the implementation specific behaviour for MacOS, FreeBSD and Linux, specifically whether each FILE *
will have its own line buffer, and whether there's any chance of lost or interleaved writes.