Message265501
When the following code snippets are run from two separate shells, the code inside the function does not raise any error on the second call while the second snippet successfully raises a BlockingIOError on the second run:
# No error raised.
def func():
lockfile = open('lockfile', 'w')
fcntl.flock(lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
input() # no error raised, can be sleep etc..
func()
# Error raised.
lockfile = open('lockfile', 'w')
fcntl.flock(lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
input() # no error raised |
|
Date |
User |
Action |
Args |
2016-05-14 02:03:39 | pcunningham80@gmail.com | set | recipients:
+ pcunningham80@gmail.com |
2016-05-14 02:03:39 | pcunningham80@gmail.com | set | messageid: <1463191419.08.0.084074707962.issue27016@psf.upfronthosting.co.za> |
2016-05-14 02:03:38 | pcunningham80@gmail.com | link | issue27016 messages |
2016-05-14 02:03:37 | pcunningham80@gmail.com | create | |
|