Re: data written to file missed by reader




Kaz Kylheku wrote:

Also, be sure that you don't have multiple threads or processes sharing
the same file descriptor. Every reader must use its own, separately
opened fd.

That's not true if one of two things is the case:

1) The file descriptor is protected by a mutex that is acquired before
a seek and released after the read/write, or

2) You only use operations with built-in seeks like pread/pwrite.

DS

.



Relevant Pages