Re: File monitor rewrite: Solaris (and other) help wanted



On Thu, 2015-01-15 at 10:49 -0500, Morten Welinder wrote:
My plan is to make it a guarantee of the API that both CREATED
and CHANGED events will always be followed by a CHANGES_DONE
hint.

Great plan, but you cannot get that in a meaningful way.  Think

    creat
    write
    mmap
    close
    # Further writes by way of the mapped region

I don't think you can detect the end of that write.

You can always queue a timeout-based changes_done. There is no guarantee
that it will be after the "last ever" change. But you can still give a
guarantee that every change will always be followed by at least one
changes_done.

Its a good thing in general to do these virtual change_done anyway, as
it then automatically handles the logfile case where a file is written
to now and then but never closed.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]