This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: general setup.exe status incl network install [was Re: setup ChangeLog IniDBBuilder.h IniDBBuilderPac ...]
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 17 Dec 2009 11:02:38 +0100
- Subject: Re: general setup.exe status incl network install [was Re: setup ChangeLog IniDBBuilder.h IniDBBuilderPac ...]
- References: <20091213192343.10516.qmail@sourceware.org> <20091216085611.GJ8059@calimero.vinschen.de> <4B28ED95.1020806@gmail.com> <20091216143717.GA3024@calimero.vinschen.de> <4B298A58.9020304@gmail.com> <20091217094001.GQ8059@calimero.vinschen.de>
- Reply-to: cygwin-developers at cygwin dot com
[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
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat