Mail Archives: cygwin-developers/1999/06/30/21:07:50
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 -