procmail
[Top] [All Lists]

local lockfile colon in a variable

2002-04-09 13:10:48
I can't think of a way to test this on my own except somehow to make two
messages arrive simultaneously and see if they interleave or not, so I'll ask
instead.

 :0 # foo could be "filename" "dirname" "dirname/" or"dirname/."
 * ! ? test -d $foo
 { locallock=: }

 :0$locallock
 $foo

If $foo is an existing plain file or if it doesn't exist yet (and procmail is
going to create an mbox under that name), would that code tell procmail to
secure $foo$LOCKEXT as a local lockfile before writing?

What about this?

 :0${locallock+:some_other_name_for_the_lockfile}
 $foo

Thanks to anyone who helps.





_______________________________________________
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>