procmail
[Top] [All Lists]

Re: Message tag suffix

1997-09-04 06:36:20

One extreme caution about that: if you use $$ in a procmailrc action that
invokes a shell, the shell will substitute its own PID for "$$" instead of
procmail's.  (The same will happen with $- but not with the named form
$LASTFOLDER.)  The workaround is to assign

  PID = $$

in the procmail rcfile before using it in an action line; then refer to it
as $PID.

One more caution: in a previous discussion, someone pointed out the VERY
slim (but not zero) chance that two hosts might call procmail at the same
time with the same PID.  If you are using the PID without other
"uniquifiers" for a file name which will persist for a while, then even if
you have only one host, eventually the PID will be repeated.  The backup
file name will be used again, but only when the previous use is deleted.
If you delete all other uses of the same string when you delete it from
the backup folder, then you will have no conflict.

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