[BusyBox] tar and gunzip changes

Robert Kaiser rob at sysgo.de
Wed Mar 28 15:13:35 UTC 2001


Hi Glenn,

On Mit, 28 Mär 2001 you wrote:
> tar -z should be working again now (it does for me).


The tar -z race condition that I reported yesterday is definitely gone now :-)

> 
> If you find something is broken, do let me know, but i hope everything
> is alright

In tar.c, if -z is not given (i.e. unzipFlag = FALSE), you end up calling
gz_close() with an uninitialized pid parameter. I would suggest to apply
the attached "patch-tar".


> I commented out the signal handling, im not too sure about that...

me too :-)

The signal handling in routine unzip() looks OK to me, no reason to comment it
out. Also, the signal handler abort_gzip() should do an exit() as originally
intended.

But gz_open() should _not_ setup any signal handling. gz_open() gets called
by the _parent_ process, but abort_gzip() is a signal handler intended to
handle signals sent to unzip, not to unzip's parent. Setting up abort_gzip() as
SIGCHLD handler for the parent as the commented-out code suggests IMHO
makes no sense at all.
Attached is another patch "patch-gunzip" that changes gunzip.c accordingly.


Cheers

Rob

----------------------------------------------------------------
Robert Kaiser                         email: rkaiser at sysgo.de
SYSGO RTS GmbH
Am Pfaffenstein 14                    phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany   fax:   (49) 6136 9948-10
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-tar
Url: http://lists.busybox.net/pipermail/busybox/attachments/20010328/99eeaf99/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-gunzip
Type: text/x-c
Size: 1015 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20010328/99eeaf99/attachment.bin 


More information about the busybox mailing list