[Python-bugs-list] [ python-Bugs-485342 ] fcntl.lockf broken?

noreply@sourceforge.net noreply@sourceforge.net
Sun, 25 Nov 2001 09:01:42 -0800


Bugs item #485342, was opened at 2001-11-25 09:01
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=485342&group_id=5470

Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Nobody/Anonymous (nobody)
Summary: fcntl.lockf broken?

Initial Comment:
fcntl.lockf appears broken to me. It always gives me
"bad file descriptor", even though I can use the file
object from which it is derived:

>>> import fcntl
>>> f = open("names.db", "r")
>>> fcntl.lockf(f.fileno(), fcntl.LOCK_EX)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
IOError: [Errno 9] Bad file descriptor
>>> data = f.read()
>>> len(data)
45056

Since posixfile is officially deprecated, this would
be nice to have working...

Environment: Mandrake 8.1, gcc 2.96, glibc 2.2.4


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=485342&group_id=5470