[Zodb-checkins]
SVN: ZODB/branches/jim-zeo-blob/src/ZODB/lock_file.txt
Can't read lock files on Windows. (I suspect this could be fixed if
Jim Fulton
jim at zope.com
Wed May 16 16:01:30 EDT 2007
Log message for revision 75812:
Can't read lock files on Windows. (I suspect this could be fixed if
we called the low-level Windows APIs better.)
Changed:
U ZODB/branches/jim-zeo-blob/src/ZODB/lock_file.txt
-=-
Modified: ZODB/branches/jim-zeo-blob/src/ZODB/lock_file.txt
===================================================================
--- ZODB/branches/jim-zeo-blob/src/ZODB/lock_file.txt 2007-05-16 18:11:19 UTC (rev 75811)
+++ ZODB/branches/jim-zeo-blob/src/ZODB/lock_file.txt 2007-05-16 20:01:29 UTC (rev 75812)
@@ -11,12 +11,6 @@
>>> import ZODB.lock_file
>>> lock = ZODB.lock_file.LockFile('lock')
-The lock contains the pid of the creating process:
-
- >>> import os
- >>> open('lock').read().strip() == str(os.getpid())
- True
-
If we try to lock the same name, we'll get a lock error:
>>> try:
@@ -31,6 +25,7 @@
The lock file is automatically removed:
+ >>> import os
>>> os.path.exists('lock')
False
@@ -43,7 +38,7 @@
It's OK if the file exists, say because it wasn't cleaned up properly:
- >>> _ = open('lock', 'w')
+ >>> open('lock', 'w').close()
>>> os.path.exists('lock')
True
>>> lock = ZODB.lock_file.LockFile('lock')
More information about the Zodb-checkins
mailing list