[RFA]: some speed up changes

Corinna Vinschen corinna@vinschen.de
Sun Apr 23 15:59:00 GMT 2000


Chris Faylor wrote:
> 
> On Sun, Apr 23, 2000 at 11:54:18AM +0200, Corinna Vinschen wrote:
> >- In symlink::check() a request for nt attributes is eliminated.
> >  The check for exec bit isn't used later but is very time
> >  consuming.
> 
> I did a little more checking on this.  The setting of PATH_EXEC *is*
> used by other things.  It's tested via the path_conv::isexec method
> in fhandler.cc.  It short-circuits a file open and a check for '#!'.

That's right, I checked that a week ago, too. But if you check it
further you will see that it's only used to set the execable flag in
class fhandler which itself is used only once:
It's used to set the x bit if and only if get_file_attribute fails!

Now the question: Why should get_file_attribute be used to get a flag
that is used only if get_file_attribute fails?!? IMHO that is paradox!

> Also, rather than test for os_being_run == winNT, couldn't you be
> using the has_acls() method?

Maybe but that would disallow further usage of the file handle in
ntea.cc. What's about a test for allow_ntsec resp. allow_ntea?

Corinna


More information about the Cygwin-patches mailing list