general setup.exe status incl network install [was Re: setup ChangeLog IniDBBuilder.h IniDBBuilderPac ...]

Corinna Vinschen
Thu Dec 17 10:02:00 GMT 2009

[Redirected to cygwin-developers]

On Dec 17 10:40, Corinna Vinschen wrote:
> On Dec 17 01:33, Dave Korn wrote:
> >   I think the strace suggests where the problem lies:
> > [...]
> >   It looks like the unlink-while-you-still-have-an-open-handle-to-the-file
> > trick isn't working on SMB mounts, perhaps?
> Indeed.  unlink-while-you-still-have-an-open-handle-to-the-file requires
> to be able to move the file to the recycle bin.  The recycle bin does not
> exist on shares.  So you get an EBUSY which is perfectly fine with POSIX.

The question is probably, do we need an unlink-while-you-still-have-an-
open-handle-to-the-file functionality which also works on shares?

Right now it works like this:  If no recycle bin exists, create it.
Move the file to the bin and set the delete disposition if possible.
Recycle bins only exist on local drives, so shares are out of luck.
Two possible workarounds come to mind:

- Rename the file to something really terrible within the same dir.

  - Potential name collisions (need a good algorithm for weird filenames)
  - Disallows to remove the parent dir
  + Simple

- On shares, create a bin dir on the top level and move the file there.

  - Intrusive (create a new dir just for Cygwin)
  - Error prone (the local machine doesn't know if the top level of
    a share really belongs to the same drive as the subdir in which
    the unlink is done)
  - Not so simple
  + No name collisions
  + Allows to remove the parent dir


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-developers mailing list