Date: Wed, 9 Oct 2002 10:33:55 +0300 From: Maxim Sobolev <sobomax@FreeBSD.ORG> To: Tim Robbins <tjr@FreeBSD.ORG> Cc: Gordon Tetlow <gordont@gnf.org>, current@FreeBSD.ORG Subject: Re: tar problems with --fast-read Message-ID: <20021009073355.GB81270@vega.vega.com> In-Reply-To: <20021009114912.A25136@dilbert.robbins.dropbear.id.au> References: <20021008170109.GA389@roark.gnf.org> <20021009114912.A25136@dilbert.robbins.dropbear.id.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Committed, thank you very much! -Maxim On Wed, Oct 09, 2002 at 11:49:12AM +1000, Tim Robbins wrote: > On Tue, Oct 08, 2002 at 10:01:09AM -0700, Gordon Tetlow wrote: > > > I was trying out the fast-read feature of tar and got the following: > > > > gtetlow@roark:~$ touch testa testb > > gtetlow@roark:~$ tar cf test.tar testa testb > > gtetlow@roark:~$ tar tf test.tar --fast-read testa > > testa > > Terminated > > gtetlow@roark:~$ > > > > Further investigtion shows that there is a SIGPIPE being delivered. > > Any ideas? > > Looks like it's doing kill(0, SIGTERM) and killing itself when fast-read is > used and there is no child process (gzip). This is consistent with the > fact that if you add "gzip test.tar" between your second and third command, > and change the third to "tar tfz ...", it doesn't seem to terminate itself. > > Try this patch: > > Index: buffer.c > =================================================================== > RCS file: /home/tim/freebsd/src/contrib/tar/src/buffer.c,v > retrieving revision 1.4 > diff -u -r1.4 buffer.c > --- buffer.c 2 Oct 2002 08:42:06 -0000 1.4 > +++ buffer.c 9 Oct 2002 01:36:48 -0000 > @@ -1339,7 +1339,7 @@ > might become clever enough to just stop working, once there is no more > work to do, we might have to revise this area in such time. */ > > - if (fast_read_option && namelist_freed) > + if (fast_read_option && namelist_freed && child_pid > 0) > kill(child_pid, SIGTERM); > > if (access_mode == ACCESS_READ > > > > Tim > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021009073355.GB81270>