lockfile problem
Garrett G. Hodgson
garry at sage.att.com
Tue Jun 15 09:43:30 EDT 1999
i'm having some trouble using mailman, and it appears to
be a problem with lockfiles and either nfs or sgi.
given the following program:
import sys, os, marshal, string, posixfile, time
ou = os.umask(0)
try:
lock_file = posixfile.open(
os.path.join( '/home/mailman/locks', '%s.lock' % 'testlock' ),
'a+')
finally:
os.umask(ou)
lock_file.lock('w|', 1)
when i run it on a sunos machine, where /home/mailman actually resides,
it works. when i run it on our sgi web server machine, where it is nfs
mounted, it fails with:
$ testlock.py
Traceback (innermost last):
File "testlock.py", line 12, in ?
lock_file.lock('w|', 1)
File "/usr/local/lib/python1.5/posixfile.py", line 190, in lock
flock = fcntl.fcntl(self._file_.fileno(), cmd, flock)
IOError: (22, 'Invalid argument')
any ideas how i can fix this?
--
Garry Hodgson comes a time
garry at sage.att.com when the blind man
Software Innovation Services takes your hand, says,
AT&T Labs "don't you see?"
More information about the Python-list
mailing list