Re: zeroseek and qmail

Charles Cazabon <[email protected]> Tue, 27 Aug 2002 13:07:56 -0600
Newsgroups gmane.comp.djb.zeroseek
Message-ID <[email protected]>
Jos Backus <[email protected]> wrote:
> On Tue, Aug 27, 2002 at 10:36:43AM -0600, Charles Cazabon wrote:
> > As you say, he only talks about the seekability in terms of the fd
> > provided to qmail-local, not /by/ qmail-local to other programs.
> > 
> > The only obvious way I can think of to keep the fd provided to programs
> > seekable under zeroseek would involve copying the message to a temporary
> > file and providing an fd to that; this could be done inside qmail-local
> > when it invokes a command delivery.
> 
> That sounds kind of messy to me.

Not really.  And since on most systems, most deliveries will be either
forwarding "&" directives or maildir/mbox directives, qmail-local only has to
do it when it sees the comparitively rare "|" program delivery directive.
And that's assuming that qmail-local tries to make the fd seekable for the
program -- I don't see why djb couldn't simply say "stdin for the program is
now a socket" and tell you to do this if you want it seekable:

  | seekablepipe ... yourprogram

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon                         <[email protected]>
GPL'ed software available at:     http://www.qcc.ca/~charlesc/software/
-----------------------------------------------------------------------