[PATCH v4 0/5] make open/unlink failures user friendly on windows using retry/abort
- From
Heiko Voigt <hvoigt@hvoigt.net>
- Date
- Feb 7, 2011, 20:48 UTC
- Message-ID
- <20110207204818.GA63976@book.hvoigt.net>
- In-Reply-To
- <7vmxo6pxyi.fsf@alter.siamese.dyndns.org>
This is the fourth iteration of my patch series with hopefully all the mentioned issues addressed.
On Wed, Dec 15, 2010 at 12:45:09PM -0800, Junio C Hamano wrote:
Show 13 quoted lines
> Erik Faye-Lund <kusmabite@gmail.com> writes: > > > Perhaps instead we would be better of with something like an xunlink > > (etc) in wrapper.c that deals with this on all platforms (and make > > sure that unlink sets errno to EBUSY correctly if it doesn't already)? > > That is superficially similar to the way we let xread() silently handle > short read to give us an easier to use API. Especially, the part to > silently retry for a few times is similar to xread() recovering by > repeating short reads. > > I do not think "ask the user one last time" part belongs to such a > wrapper, though.
I think we should currently keep this Windows specific because this is the only system where such problems occur in practise. If we find later on that other systems are affected with the same problem we can still move the functions to another more public place. But without proper testing whether it helps on other setups as well putting this into a more prominent place does not make sense, IMO.
Cheers Heiko
Heiko Voigt (4): mingw: move unlink wrapper to mingw.c mingw: work around irregular failures of unlink on windows mingw: make failures to unlink or move raise a question mingw: add fallback for rmdir in case directory is in use
Johannes Schindelin (1): mingw_rmdir: set errno=ENOTEMPTY when appropriate
compat/mingw.c | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- compat/mingw.h | 14 ++--- 2 files changed, 173 insertions(+), 9 deletions(-)
-- 1.7.4.34.gd2cb1