watching for file creation completion [was Re: Synchronous signal delivery..]

From: Alexander Kellett (lypanov@kde.org)
Date: Thu Mar 27 2003 - 16:40:20 EST


hiya all,

On Thu, Feb 13, 2003 at 11:45:18PM +0300, Paul P Komkoff Jr wrote:
> These functions have one nice purpose: we can watch a directory hierarchy
> for changes an efficient way. e.g. AFAIK via dnotify I can only see that
> directory was changed, but cannot actually get all the changes. If I will
> re-read all directory, I can miss some changes (if other process is
> tampering with this dir too).

fully agreed. queued events / batch notifications would also be kind of nice.

the fact that it is not possible to see if a file write has been
completely written out currently (i.e, written to and then closed)
is quite frustrating. anyone got any ideas for this?

currently i'm doing the ugly - readdir on dnotify signal, then
check mtime's to see if > 5 seconds, and just assume the writing
process has finished, then force a readdir in case any events
were missed while dnotify notification was off.

mvg,
Alex
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:29 EST