From owner-freebsd-current Wed Oct 9 0:34:19 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E54ED37B401; Wed, 9 Oct 2002 00:34:17 -0700 (PDT) Received: from baraca.united.net.ua (ns.united.net.ua [193.111.8.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BA3843E42; Wed, 9 Oct 2002 00:34:07 -0700 (PDT) (envelope-from max@vega.com) Received: from vega.vega.com (xDSL-2-2.united.net.ua [193.111.9.226]) by baraca.united.net.ua (8.11.6/8.11.6) with ESMTP id g997Y1g08090; Wed, 9 Oct 2002 10:34:01 +0300 (EEST) (envelope-from max@vega.com) Received: from vega.vega.com (max@localhost [127.0.0.1]) by vega.vega.com (8.12.6/8.12.5) with ESMTP id g997XwTs081323; Wed, 9 Oct 2002 10:33:58 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Received: (from max@localhost) by vega.vega.com (8.12.6/8.12.5/Submit) id g997XuCg081322; Wed, 9 Oct 2002 10:33:56 +0300 (EEST) Date: Wed, 9 Oct 2002 10:33:55 +0300 From: Maxim Sobolev To: Tim Robbins Cc: Gordon Tetlow , current@FreeBSD.ORG Subject: Re: tar problems with --fast-read Message-ID: <20021009073355.GB81270@vega.vega.com> References: <20021008170109.GA389@roark.gnf.org> <20021009114912.A25136@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20021009114912.A25136@dilbert.robbins.dropbear.id.au> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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