delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/03/15:26:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 3 Jun 2004 15:27:26 -0400
From: "Pierre A. Humblet" <pierre DOT humblet AT ieee DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: rm prints no errmsg if _unlink fails with errno 32
Message-ID: <20040603192726.GC246877@Worldnet>
References: <40BCC40D DOT 70302 AT x-ray DOT at> <40BF773F DOT 60102 AT x-ray DOT at>
Mime-Version: 1.0
In-Reply-To: <40BF773F.60102@x-ray.at>
User-Agent: Mutt/1.4.1i

On Thu, Jun 03, 2004 at 09:08:47PM +0200, Reini Urban wrote:
> Reini Urban schrieb:
> >(latest cygwin release 1.5.10-3 and fileutils-4.1-2)
> >rm printed no errmsg if _unlink failed with errno 32.
> 
> Pierre ping?
> 
> Should I patch it by myself? But I don't know where.
> The syscall fails, but is not responsible for any errormessage to STDERR.
> And rm gets a wrong status code, because the delete was queued, and 
> fails later.
> 
> I'd rather prefer _unlink() returning an errcode on a sharing violation.

Reini,

AFAICS, a better subject line for your message would be
"unlink succeeds when DeleteFile reports Windows Error 32"

~> net helpmsg 32
The process cannot access the file because
it is being used by another process.

That's a Windows feature, not present in Unix. 
The Cygwin behavior that you see has been in effect for years,
well before I got involved with Cygwin. Queueing the delete
is not perfect, but it is usually better than returning an error.

You are surely free to modify cygwin to have unlink return an
error in that case.

Pierre


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019