procmail
[Top] [All Lists]

Re: lock files

2000-02-15 12:24:04
On Tue, Feb 15, 2000 at 10:18:11AM -0600, Glen Lee Edwards wrote:
ABSOLUTELY!  I wrote a talk list program in Perl that I use on a couple
of my domains.  I use procmail to read TO, and then forward the letter to
the program if the letter is addressed to one of the talk lists.  I've had 
trouble with letters dying if the talk list program is still dealing with 
a previous letter while another tries to access the program.  If I'm reading
your letter correctly if I have :0: any subsequent letters to the list
program will remain in a holding pattern until the lock is released.

That's probably not what you want actually. What you want is :0 w or :0 W.
This will cause procmail to let the program finish before continuing. Placing
a lock file probably won't prevent it from runnng another instance of your
perl script. Another option is to add some sort of locking inside the script,
so one invocation doesn't stomp on another when they both try to write to the
same destination file.

-- 
Andrew Edelstein                email: andrew(_at_)infonent(_dot_)com
Core Services Division          voice: 408-278-4430
Infonent.com, Inc.
San Jose, CA

All opinions or statements are my own and are not official statments of either
Comms People, Inc. or Infonent.com, Inc./ Ideaflood, Inc.

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