[Mailman-developers] Re: anyone got mailman running on freebsd ?

Ken Manheimer klm@python.org
Tue, 5 May 1998 13:00:33 -0400 (EDT)


A message in the python newsgroup points out a likely portability
problem with mailman under FreeBSD, in particular with file locking
mechanisms.

sweeting@neuronet.com.my writes:

> Sorry to trouble you but I've run into a problem setting up
> mailman (python mailling list software) on FreeBSD and wonder
> if there are any special config for FBSD ?
> [...]
> However, accessing any of the URLs to manage the lists
> returned server config errors. The apache logs said were
> almost as unhelpful :
> 
> [Tue May  5 03:10:07 1998] access to /home/mailman/cgi-bin/listinfo failed for
> 202.184.153.17, reason: Premature end of script headers
> [Tue May  5 03:10:18 1998] access to /home/mailman/cgi-bin/admin failed for
> 202.184.153.17, reason: Premature end of script headers

(Note for mailman-developers, including me - it may be worth noting in
the troubleshooting section of the README about Apache (and other?)
error log notices something to the effect of "premature end of script
headers" meaning that the script in question probably bombed before
producing any, or sufficient, output.

And, it occurs to me, it may be worth breaking out the troubleshooting
section of the README into a separate file, and eventually as a
section of a prospective admin guide.)

> Trying to interact from the python interpreter also
> produced errors :
> >>> import sys
> [...]
>   File "/usr/local/lib/python1.5/posixfile.py", line 190, in lock
>     flock = fcntl.fcntl(self._file_.fileno(), cmd, flock)
> IOError: (22, 'Invalid argument')

We mailman developers need to look into this issue, in particular
guido's suggestion that:

Guido:
> A much more portable way to do file locking is to use fcntl.lockf()!

Clearly we need some fairly portable solution, and it probably makes
sense to tackle this now.  Barry has an article by jamie zawinski
pointing out the pitfalls of locking, with a conclusion (i gather)
that use of a directory (with a leading '.' dot in its name) is the
best portable answer.  I'd be interested to hear whether anyone has a
fairly clear-win solution - one that's simple and portable - and/or
whether just switching over to fcntl.lockf() is the right thing.
Maybe andrew's discussions (in that thread) about revision of the
posixfile interfaces should play in here...

Ken