procmail
[Top] [All Lists]

Re: Locks OK with {}'s?

1997-12-24 14:09:55
On Tue, 23 Dec 1997, David W. Tamkin wrote:

There is one exception: if the nested block launches a clone, a local
lock- file on the recipe that opens the block (and spawns the clone) is
meaningful: the parent procmail will not spawn the clone until it can get
the lock. Thus if two or more incoming messages both trigger clones, a
local lockfile there can make the clones run serially. If you also use
the `w' or `W' flag, the parent will hold onto the lockfile until the
clone exits. The effect is similar to a global lockfile for the clones
(except that the parents, not the clones, handle the locking and waiting) 

Thanks, David! I just realized after reading your explanation that I
probably should apply this to a procmail script I run on another account.
But I'm not satisfied with my latest attempt to demonstrate the function
to myself.

# test recipe (on procmail v.3.10):
        :0cw:${HOME}/lastmail
                {
                :0
                | cat >${HOME}/lastmail
                }

It is curious to me that procmail first logs "Extraneous lockfile
ignored", then appears to honor the lockfile as you say it would. Perhaps
I haven't tested this properly yet.

procmail: Extraneous locallockfile ignored
procmail: Locking "/home1/users/d/dh/lastmail"
procmail: Forking "procmail"
procmail: [25656] Wed Dec 24 12:14:24 1997
procmail: Assigning "LASTFOLDER= cat >${HOME}/lastmail"
From dh(_at_)west(_dot_)net  Wed Dec 24 12:14:19 1997
procmail: [25656] Wed Dec 24 12:14:24 1997
procmail: Executing " cat >${HOME}/lastmail"
  Folder:  cat >${HOME}/lastmail
procmail: Unlocking "/home1/users/d/dh/lastmail"

David Hunt


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