procmail
[Top] [All Lists]

Re: locking the logfile -- how to?

1997-08-23 15:43:35
dattier(_at_)wwa(_dot_)com (David W. Tamkin) wrote:
Timothy Luoma wrote in praise of global lockfiles as a way of locking the
logfile,
| The 'meat-axe' method works just fine for me anyway.
...
In general, I would not recommend the course of action that Mr. Luoma has
chosen.  If you continue to use local lockfiles, the global lockfile is of
use only to lock the logfile; if you stop using local lockfiles because you

Actually I have used globabl lockfiles for other purposes. In particular
there is a lot less resource contention if I prevent more than one of
my procmailrc files from being used at once. After I added duplicate
checking I accendtially broke the global lockfile and one particular spurt
of 70 messages in about 15 seconds nearly hosed the mailserver. Procmail
was trying to run a particularly ineffiecent perl script on each one of them.

You could achieve pertty good results just spacing out the deliveries like
this, I think:

        LOCKFILE=time.lock
        FOO=`sleep 5`
        LOCKFILE

It is roughly equivilent to what I do now, save I that I use a 3 to 5 secend
filtering by perl instead of just a 'sleep'.

Elijah
------
I /dev/null dupes, no need to CC list posts.  It is not my responsibility to
prove to you my mail is not spam, if mail to you bounces it will not be resent.