This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: etc_changed, passwd & group


Christopher Faylor wrote:

> Also, implying that there is a one-to-one correspondence between my
> ChangeLog entries and the ones for your patches is a little simplistic.

It would be, but I never compared them. I only remarked that this
became one of your largest recent projects (in terms of ChangeLog size). 

> Sorry, no.  I want to keep the input argument to etc::init.

That one keeps mystifying me.
It's like changing open to have "fh = open(fh, filename, flags)".
I have no problem with passing filename!

> If you are going to be modifying the isunintialized thing
> then why didn't you go all the way and get rid of the repeated
> code at the beginning of all of these functions?  Surely there
> is some way not to have to:
> 
>   if (pr.isuninitialized () || (check && pr.isinitializing ()))
>     read_etc_passwd ();

If I was writing the code from scratch I would have only 
pr.isinitializing (check). However these functions are inline and
the only effect of changing now (in many spots) would be aesthetic.
To the contrary, modifying the body of isinitializing brings you
real gains, both in logic (call init only once) and in efficiency 
(if it matters), while not changing the returned values.

You had no comments on my last observation, MS doesn't raise an event 
on mv and rm. I just looked up the MSDN site
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/findfirstchangenotification.asp>
I think we should add FILE_NOTIFY_CHANGE_FILE_NAME.

Pierre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]