This is the mail archive of the cygwin@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: directory opening/closing behavior


On Sun, Nov 18, 2001 at 02:58:49AM -0800, Katherina O'Connor wrote:
> > Exactly what you've described. It's a 
> > Windows feature which isn't POSIX compatible 
> > and for which a workaround would be
> > extremly difficult.
> 
> Sorry, this isn't a "Windows feature" but 
> POSIX compatible and a workaround would be 
> extremly simple, because Chad Fowler made
> a simple mistake: he forgotten to call 
> closedir() before rmdir():

No, no.  What I meant is, in POSIX systems you can unlink() stuff
which is currently opened by the same or another process.  In
Windows you get a permission denied or something.  Cygwin has
actually a workaround which is to maintain a queue of stuff which
should be unlinked but couldn't due to open descriptors.  Therefore
the removing returns success since the unlink hasn't been done yet
but it's queued and will be performed when possible.  The following
mkdir fails since the directory still exists.  That's rather
difficult to do as a POSIX system expects with the underlying
Windows behaviour.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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