EVFILT_VNODE vs. fstat()

From: Mikhail Teterin <mi+mx_at_aldan.algebra.com>
Date: Tue, 13 Jun 2006 15:55:08 -0400
Hello!

I have a program, that waits for the input file to be written to (using 
EVFILT_VNODE, fflags = NOTE_EXTEND) to process it.

When kevent() returns upon the file's extension, the program calls fstat() to 
learn the new size of the file.

Every once in a while, the fstat still reports the old size and my program 
goes into kevent() once again.

Is this discrepancy "normal"? Thanks!

	-mi

P.S. I would love to avoid having to call fstat() at all, but -- unlike 
EVFILT_READ -- the EVFILT_VNODE/NOTE_EXTEND does not place any additional 
results into the event's data :-( Using EVFILT_READ is not straigtforward 
either, because I mmap input, instead of read-ing it...
Received on Tue Jun 13 2006 - 17:55:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:57 UTC