[New-bugs-announce] [issue27016] BlockingIOError not raised inside function.
padraic cunningham
report at bugs.python.org
Fri May 13 22:03:39 EDT 2016
New submission from padraic cunningham:
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
----------
components: IO
messages: 265501
nosy: pcunningham80 at gmail.com
priority: normal
severity: normal
status: open
title: BlockingIOError not raised inside function.
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27016>
_______________________________________
More information about the New-bugs-announce
mailing list