shouldn't tar quit at end of archive?

Rob Landley rob at landley.net
Sat Apr 1 17:39:09 UTC 2006


On Friday 31 March 2006 8:30 pm, Rich Felker wrote:
> On Fri, Mar 31, 2006 at 07:20:42PM -0500, Rob Landley wrote:
> > On Friday 31 March 2006 5:45 pm, Rich Felker wrote:
> > > Solution seems simple to me: loop reading junk if and only if the
> > > input is a decompressor. Otherwise just exit.
> >
> > So we're supposed to detect zcat | tar how?
>
> fstat?

If the input is a pipe, how do we know it's a pipe from a decompressor?  The 
proposed behavior seems to be a fairly brittle heuristic.

However, if the first process getting EPIPE on its output doesn't produce an 
error message (as you pointed out earlier), it's moot.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list