procmail
[Top] [All Lists]

any better way to bail after one try?

2000-01-08 16:36:59
I'll isolate this question into its own post; maybe someone will respond.

Say you have an action in your procmail rcfile that, if it's already being
done by another procmail process, you don't want the current procmail to do
it at the same time, but you don't want it to wait either: what you want is
for the current procmail process not to do it at all if another procmail is
already doing it.  You want this one to skip on ahead.  It can be coded this
way:

  :0 flags
  * other conditions
  * ? lockfile -r0 lockfilename
  action
  :0Ai
  | rm -f lockfilename

Question: is there a better way to code this without the outside calls to
lockfile and rm, where procmail's own creation and removal of lockfiles can
be put to use?

<Prev in Thread] Current Thread [Next in Thread>