On Tue, 27 Oct 1998 06:40:04 -0800 (PST),
Nick Halloway <snowe(_at_)rain(_dot_)org> wrote:
On Tue, 27 Oct 1998, era eriksson wrote:
Perhaps this is really what you want then. The rest of your question
seems a little unrelated to this, though. Can you give a specific
example of what you want to accomplish?
My .procmailrc pipes messages to a robomoderator program. I don't want
two copies of the robomoderator program running at once. Will this
happen with a lockfile?
LOCKFILE=$HOME/.lockmail
VERBOSE=yes
:0
* ^TO(_dot_)*mathqa-request(_at_)rain(_dot_)org
| $HOME/stump/admin/etc/modenv request
Yes, you want
LOCKFILE=$HOME/.lockmail
VERBOSE=yes
:0w # Notice w flag here, and tightened-up regex
* ^TO_mathqa-request(_at_)rain\(_dot_)org
| $HOME/stump/admin/etc/modenv request
I get the impression from this that it unlocks the lockfile before the
robomoderator is called. This may not be true though, because the
robomoderator calls procmail itself and if *that* procmail rcfile is
using the same lockfile as my .procmailrc, it hangs.
Obviously, yes, you end up in deadlock if the program which calls up
modenv is locking a file modenv needs and stays around and waits for
modenv to finish.
So how can one prevent two robomoderator programs running at once?
Does modenv specifically need to read your .procmailrc? Could it use a
separate lock file and rc file instead?
/* era */
--
Bot Bait: It shouldn't even matter whether (`') Just (`') http://www.iki
I am a resident of the State of Washington \/ Married! \/ .fi/~era/