[BusyBox] tar -z support

Erik Andersen andersen at lineo.com
Fri Dec 1 16:03:32 UTC 2000


On Sat Dec 02, 2000 at 01:01:00AM +1100, Glenn McGrath wrote:
> Ive got some code to support the tar -z option, doing some more tests
> now, then i will check it in if noone objects.
> 
> I changed gunzip.c to create a gunzip_init() function and made it and
> unzip() external.
> 
> To get tar to extract i forked a new process to unzip the file, and that
> just feeds the uncompressed data back to tar. It worked easily as tar
> works in one pass.
> 
> I dont know if this is the best approach, it could be handled in a more
> superficial way using something like system("zcat filename.tar.gz | tar
> -xv "), personally i try and avoid using system(), but maybe thats just
> me though.

Please post this code to the list before committing so we can comment on it.
forking is certainly one way of doing it.  The traditional way is to create a
pipe and use that to do the filtering..

 -Erik

--
Erik B. Andersen   email:  andersen at lineo.com
--This message was written using 73% post-consumer electrons--





More information about the busybox mailing list