This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pcunningham80@gmail.com
Recipients pcunningham80@gmail.com
Date 2016-05-14.02:03:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463191419.08.0.084074707962.issue27016@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-05-14 02:03:39pcunningham80@gmail.comsetrecipients: + pcunningham80@gmail.com
2016-05-14 02:03:39pcunningham80@gmail.comsetmessageid: <1463191419.08.0.084074707962.issue27016@psf.upfronthosting.co.za>
2016-05-14 02:03:38pcunningham80@gmail.comlinkissue27016 messages
2016-05-14 02:03:37pcunningham80@gmail.comcreate