This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
file change notifications - the unix model is?
- To: <cygwin-developers at cygwin dot com>
- Subject: file change notifications - the unix model is?
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- Date: Tue, 17 Apr 2001 18:02:32 +1000
It think the title pretty much sums it up.
I am currently doing a documentation search, but perhaps one of you folk
can give me a name to search for. This is for /etc/passwd parsing.
As I see it we can
a) use win32 filechange notification semantics. This may involve being
notified on writes to /etc and then checking the date on /etc/passwd, or
I may be able to be informed about /etc/passwd directly - not sure yet.
The ugly thing is we'd have to get the win32 path, and then get told
about mount point changes.
b) implement the unix model, and have that model be mount point change
aware. This has the advantage of reusability, and possibly adding extra
external functionality as well.
--- possible different approach---
memory map /etc/passwd and parse it every time. As there'd be no file
read overhead, and it should get very high cache hit rates this should
be pretty quick. I'm willing to do a test implementation for testing to
see if it does have the same perf hit as parsing via file read/writes
every time.
Rob