procmail
[Top] [All Lists]

Re: Executing external cmds via procmail

2003-05-07 14:29:31
Paul Chvostek wrote:

  :0: /path/to/file.lock
  #whatever
  {
    :0 bwc
    /path/to/file

    :0
    | /path/to/program /path/to/file
  }

Nope, won't work. You can't put a local lockfile on a brace opening, even with a name, unless you're launching a clone.

If "/path/to/file" means the same file both times, we need a regional lockfile:

 :0
 * conditions if any
 {
  FILE=/path/to/file #easier to edit if you change the name

  LOCKFILE=$FILE$LOCKEXT

  :0bwc
  $FILE

  :0
  | /path/to/program "$FILE"

  LOCKFILE # in case of fall-through on write error
 }


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail