shouldn't tar quit at end of archive?

Rich Felker dalias at aerifal.cx
Sat Apr 1 19:25:28 UTC 2006


On Sat, Apr 01, 2006 at 12:39:09PM -0500, Rob Landley wrote:
> 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.

No, I was saying it's probably safe to read forever whenever the input
is a pipe. Sorry I wasn't clear. But if gunzip,etc. don't print error
messages I guess it doesn't matter.

BTW, is there a reason a pipe needs to be used for this? It seems like
it would also be possible to use the decompression code in the same BB
process rather than forking.

Rich




More information about the busybox mailing list