procmail
[Top] [All Lists]

Re: MH Mail folders question

2002-06-19 08:59:44
Edward Wildgoose <Edward(_dot_)Wildgoose(_at_)FRMHedge(_dot_)com> wrote:
Hmm, but perhaps procmail writes out the first half of the file, and then
my perl app reads the file and assumes that is the whole mail?  Please
excuse me if I have failed to understand unix open/creat calls...

The ordering that I am after is oldest to newest and no other, so
presumably I am fine to keep using the procmail method?

Ah, and now I'm finally beginning to see the forest and not just the
individual trees.  Should teach me to reply so soon after I awake.

Looking back at your first question, yes, you have 2 processes working with
the same resource; so, to be sure your consumer script doesn't try to
access incomplete information before the producer (procmail) is done, that
will require locking.  Depending on procmail compile options, you can just
pick any file for the lockfile (since my procmail tested to use dotlocking
during the compile I use a dotfile inside the mh directory), and just make
sure your script looks at the same file.  You can do it manually, or look
at something like LockFile::Simple since you mention perl.


-philip

-- 
Philip Kizer, Senior Lead Systems Engineer, Texas A&M University
USENIX Liaison to Texas A&M University         <usenix(_at_)tamu(_dot_)edu>
Texas A&M CIS Operating Systems Group, Unix   <pckizer(_at_)tamu(_dot_)edu>
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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