[Mailman-Developers] Here's a little issue with the news gatewaying: If the n

Barry A. Warsaw barry@digicool.com
Tue, 13 Mar 2001 17:04:44 -0500


>>>>> "P" == Patriot  <room_maildev@bbs.pixel.citadel.org> writes:

    P>  Here's a little issue with the news gatewaying: If the news
    P> server you're trying to get to is down, or is slow and having
    P> problems mailman creates a lock file and doesn't unlock.  The
    P> next time (every 5 minutes in my case) the gateway attempts to
    P> run the lock files are in place and it evidently fails.  Is
    P> there anything I can do to clear those lock files manually, or,
    P> more importantly, is there anyway that mailman can be
    P> configured to time out, and remove its own lockfiles/
   
Hmm, I'm not entirely sure I believe that.  cron/gate_news has a
try/finally that should force the release of the global gate_news lock
when any error occurs.  So the news->mail path should be safe.

The mail->news path is a little trickier because Mailman 2.0.x forks a
child to do the delivery in that direction.  The child will os._exit()
without ever releasing the lock, but by the same token, no nntp
exceptions should percolate to the parent, and the parent is the
process owning the lock and thus making sure it gets released.
Because the child process never needs to write to the MailList, it
doesn't own the lock.

Note that this has changed a bit in Mailman 2.1, where mail->news is
implemented by a completely separate queue.  Thus there are no child
processes needed, and the list is never locked by this queue.
gate_news hasn't changed substantially in this regard in 2.1.

-Barry