dattier(_at_)wwa(_dot_)com (David W. Tamkin) writes:
Philip Guenther wrote,
| The only way to have procmail
| write nothing is to cheat and execute the program from a *condition*
| which has a "var ??" special on it that refers to an empty variable.
That's a very good idea, Philip, and I wouldn't call it cheating at all.
You still don't save the pipe creation and destruction, only the writes.
So I'm not sure it's worth it.
| HOWEVER, you then lose the locking, so I would *not* do this. You
| aren't saving yourself anything.
You could still have locking with a little extra code:
:0i
* real condition
action_that_needs_no_stdin
becomes
:0
* real condition
{
LOCKFILE=name.of.lock
KEEP_ME_UNSET
:0i
* KEEP_ME_UNSET ?? ? action_that_needs_no_stdin
{ }
LOCKFILE
}
David, you cannot be serious. There's being concerned with efficiency,
and then there's just being silly.
| Anyway, procmail stops writing as soon as it gets a write error, so I
| probably wouldn't bother even putting the 'h' flag on the recipe, as it
| will probably only save the copying of something like
| PIPE_BUF-sizeof(header) bytes inside the kernel, and that's nothing.
Does procmail stop writing on the first write error even if there is an `i'
flag?
Yes. All the 'i' changes is whether procmail treats it as an error.
| If someone really cares about this, they should appeal to Stephen to add
| a new flag, say, 'I', that causes procmail to not write anything at all.
Stephen, sadly, has been MIA from here.
Cubic Circle has been keeping him pretty busy I think.
Philip Guenther