www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/06/30/21:07:50

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-ID: <377AB36C.4A500615@vinschen.de>
Date: Thu, 01 Jul 1999 02:16:44 +0200
From: Corinna Vinschen <corinna AT vinschen DOT de>
X-Mailer: Mozilla 4.6 [en] (WinNT; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: cygdev <cygwin-developers AT sourceware DOT cygnus DOT com>,
Chris Faylor <cgf AT cygnus DOT com>
Subject: Change in errno.cc

This is a multi-part message in MIME format.
--------------20310540E892572C02276C7D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Hi,

If one process has opened a file exclusively or has locked a part of the file,
then other processes, which try to open this file, will get either the error
code ERROR_SHARING_VIOLATION or the error code ERROR_LOCK_VIOLATION.
Both error codes are mapped to EACCES in errno.cc. This doesn't reflect the
real situation.
So I want to suggest the following change to errno.cc:

Change the mapping of the above error codes to ETXTBSY.

The patch is attached.

Regards,
Corinna

ChangeLog:
==========

Thu Jul 1 2:14:00  Corinna Vinschen  <corinna AT vinschen DOT de>

	* errno.cc: Changed the error mapping of ERROR_SHARING_VIOLATION
	and ERROR_LOCK_VIOLATION from EACCES to ETXTBSY.
--------------20310540E892572C02276C7D
Content-Type: text/plain; charset=us-ascii;
 name="errno-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="errno-patch"

Index: errno.cc
===================================================================
RCS file: /src/cvsroot/winsup-990627/errno.cc,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 errno.cc
--- errno.cc	1999/06/28 09:00:06	1.1.1.1
+++ errno.cc	1999/06/30 23:59:37
@@ -42,8 +42,8 @@ errmap[] =
   X (NO_MORE_FILES,		ENMFILE),
   X (WRITE_PROTECT,		EROFS),
   X (BAD_UNIT,			ENODEV),
-  X (SHARING_VIOLATION,		EACCES),
-  X (LOCK_VIOLATION,		EACCES),
+  X (SHARING_VIOLATION,		ETXTBSY),
+  X (LOCK_VIOLATION,		ETXTBSY),
   X (SHARING_BUFFER_EXCEEDED,	ENOLCK),
   X (HANDLE_EOF,		ENODATA),
   X (HANDLE_DISK_FULL,		ENOSPC),

--------------20310540E892572C02276C7D--



- Raw text -


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