EVFILT_VNODE vs. fstat()
Mikhail Teterin
mi+mx at aldan.algebra.com
Tue Jun 13 19:55:23 UTC 2006
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...
More information about the freebsd-current
mailing list