test_fcntl.py failed

rjroyNoSpam at magma.ca rjroyNoSpam at magma.ca
Sun May 16 14:23:36 EDT 1999


Hi, 
	I have had this problem myself. The solution that follows is a
bit sketchy since I can't seem to access the server at work right now
so I am working from a 6 month old memory.  It should however get you
going in the right direction. 

The FCNTL.py file is " # Generated by h2py from
/usr/include/sys/fcntl.h" . This header file contains a conditional
compilation  that throws h2py off somewhat. Any values that appear in
the condional end up being defined twice and depending on the
processor you are using, things may or may not work. I think that
FCNTL.py breaks on a PA-RISC 2.0.  When you look through the FCNTL.py
file you will see duplicate definitions for F_SETLKW and several
others. You have to determine which is correct and remove the other.
In most cases, the first definition is correct.

Good Luck! Sorry this is so sketchy.


On Sun, 16 May 1999 16:19:58 GMT, rosselotNoSpam at netway.com (Don
Rosselot) wrote:

>I downloaded the Python 1.5.1 software from "hpux.cs.utah.edu"
>I am using the following machine and OS 
>HP-UX orff B.10.20 A 9000/778
>
>Everything worked except:
>The test_fcntl.py failed.  I looked at the test function, but I could
>not fix it (newbee).  I searched in the dejaNews and found out quite a
>bit about file locking, but no bug report.  
>
>Here is the output:
>
>orff 192: python test_fcntl.py
>Status from fnctl with O_NONBLOCK:  0
>struct.pack:
>'\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000'
>Traceback (innermost last):
>  File "test_fcntl.py", line 28, in ?
>    rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETLKW, lockdata)
>IOError: (22, 'Invalid argument')
>orff 193:
>
>Questions:
>1) Is this a bug or what?
>2) Is there a general file lock that is cross platform for python?
>
>Thanks
>Don Rosselot
>work:  rosselot at protons.mgh.harvard.edu





More information about the Python-list mailing list