[prev in list] [next in list] [prev in thread] [next in thread]
List: procmail
Subject: Re: locking a script
From: "David W. Tamkin" <dattier () ripco ! com>
Date: 2000-12-23 19:23:31
[Download RAW message or body]
Eric has this code,
| :0w
| *^Subject:.*wait
| | perl /home/eric/bin/wait.pl
where wait.pl creates a file and sleeps thirty seconds. He wondered,
| All the files had the same mod time from 10 executions truggered by 10
| concurrent emails.
|
| Why is the 'w' doing nothing?
`w' is doing plenty: it's telling each procmail to wait for its own perl
child to finish. It's not telling procmail to wait for any other procmail's
perl child to finish.
Try this:
:0w:wait.lock
* ^Subject:.*wait
| perl /home/eric/bin/wait.pl
There `w' should tell procmail not just to wait but also to keep the local
lockfile until perl has exited (without `w' procmail would wait to get the
lockfile but would release it as soon as perl accepted the input). Since
only one procmail instantiation can have the lockfile at a time, it should
take five minutes for all ten concurrent deliveries to finish.
_______________________________________________
procmail mailing list
procmail@lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic