]> granicus.if.org Git - python/commitdiff
Solaris needs a readable file for shared lock
authorChristian Heimes <christian@cheimes.de>
Sat, 7 Dec 2013 17:19:21 +0000 (18:19 +0100)
committerChristian Heimes <christian@cheimes.de>
Sat, 7 Dec 2013 17:19:21 +0000 (18:19 +0100)
Lib/test/test_fcntl.py

index 837fc16569a7cc53d49108fa82ef8994ab83a2d1..8e5508207141dcd7ee151f5d90b0a4c30084326e 100644 (file)
@@ -116,7 +116,8 @@ class TestFcntl(unittest.TestCase):
             os.close(fd)
 
     def test_flock(self):
-        self.f = open(TESTFN, 'wb')
+        # Solaris needs readable file for shared lock
+        self.f = open(TESTFN, 'wb+')
         fileno = self.f.fileno()
         fcntl.flock(fileno, fcntl.LOCK_SH)
         fcntl.flock(fileno, fcntl.LOCK_UN)