procmail
[Top] [All Lists]

Re: hex value in condition

1997-08-07 15:56:00
dattier(_at_)wwa(_dot_)com (David W. Tamkin) writes:
Philip Guenther has posted before that if the action line doesn't use stdin
and the `i' flag is present, `h' or `b' won't be of any further help.  (Or
did I misunderstand him?)

Correct.  If an action doesn't use stdin, procmail will call write()
repeatedly until the kernel buffer is full, at which point the write()
will block until the action terminates, when it will return -1 with
errno set to EPIPE.  Normally it will only take one write to fill the
kernel buffer, and procmail's BLKSIZ is larger than PIPEBUF (at least
on all the system's I've seen).  However, if the first PIPEBUF bytes of
whatever being written contain a line beginning with "From ", and the
'r' flag isn't on the recipe, then it may take more than one write.

So, if you are inordinately concerned with efficiency you could put an
'r' flag on the recipe and not an 'h' or 'b'.  Of course, the
difference is generally lost in the noise.

(I think last time this came up I hadn't noticed that the 'r' flag
would remove any remaining inefficiency from the process.)

Philip Guenther

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