in reply to What the flock!? Concurrency issues in file writing.

Just a quick comment: Don't mix seek (buffered I/O) and syswrite (unbuffered I/O). sysseek (unbuffered I/O) would be the tool to use.