This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: When acl() returns -1
On Mon, 27 Jun 2005, Corinna Vinschen wrote:
> On Jun 27 15:40, Dave Korn wrote:
> > >From: Corinna Vinschen
> >
> > > So what's your opinion? Should acl()
> > >
> > > keep its behaviour since it's not worth to change it for these files
> > > which are locked anyway?
> > >
> > > or should acl()
> > >
> > > return the correct number of faked acl entries which pretend that
> > > nobody has access to these (locked) files?
> >
> > How about keeping acl() the same, and fixing 'ls'?
>
> Well... hmm, why not? Sounds good to me, too.
At the risk of sounding trite, me too. :-)
> > ISTM that ls has all the information it should need to DTRT - a
> > successful call to stat(), a return value of -1 from acl() and (I
> > would hope that) errno has EACCES from the ERROR_SHARING_VIOLATION
> > return should let it deduce 'the file exists but is locked', shouldn't
> > it?
>
> Yes, except that ERROR_SHARING_VIOLATION is translated to EBUSY.
Even better.
> Any other opinion?
What does Linux do when it finds busy files (I think at least NFS allows
file locking). Or does that locking not extend to retrieving ACLs?
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT