You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2001/08/07 16:23:38 UTC
cvs commit: apr/file_io/win32 flock.c
trawick 01/08/07 07:23:38
Modified: file_io/win32 flock.c
Log:
add a comment to apr_file_lock() for Win32 about an issue detecting
the retry-able condition when another process is holding the lock
Revision Changes Path
1.5 +5 -0 apr/file_io/win32/flock.c
Index: flock.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/flock.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- flock.c 2001/02/16 04:15:39 1.4
+++ flock.c 2001/08/07 14:23:38 1.5
@@ -63,6 +63,11 @@
+ (((type & APR_FLOCK_TYPEMASK) == APR_FLOCK_SHARED)
? 0 : LOCKFILE_EXCLUSIVE_LOCK);
memset (&offset, 0, sizeof(offset));
+ /* XXX on NT 4.0 we get ERROR_LOCK_VIOLATION when we specify
+ * LOCKFILE_FAIL_IMMEDIATELY and another process is holding
+ * the lock; something needs to be done so an APR app can
+ * recognize this as a try-again situation
+ */
/* Syntax is correct, len is passed for LengthLow and LengthHigh*/
if (!LockFileEx(thefile->filehand, flags, 0, len, len, &offset))
return apr_get_os_error();