procmail
[Top] [All Lists]

Re: locking a script

2000-12-21 13:46:41
On Thu, Dec 21, 2000 at 03:51:48PM +0200, Eric Smith wrote:
How do I lock a script so that procmail will only call that script
once (and will wait until that invocation is finished until it involves
a subsequent message)?

Unless you're doing a non-delivering filter and you have another recipe
further down that calls the script again, it will only invoke it the one time
anyway. As for waiting utnil it finishes before proceeding, that's what w is
for:

          :0          # this is where I want the lock
          |cd /home/httpd/turn;su -c ./mail2sms.pl nobody

        :0w
        |cd /home/httpd/turn; su -c ./mail2sms.pl nobody

Though I'd probably make that pipe:

        | (cd /home/httpd/turn; su -c ./mail2sms.pl nobody)

-- 
Andrew Edelstein                http://andrew.pure-chaos.com

Dick Solomon: Guns don't kill people, physics kills people.
                                3rd Rock from the Sun
_______________________________________________
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>