Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 May 2009 13:33:24 -0700
From:      Tim Kientzle <kientzle@freebsd.org>
To:        Alexey Shuvaev <shuvaev@physik.uni-wuerzburg.de>, "'freebsd-current@freebsd.org'" <freebsd-current@freebsd.org>, openoffice@freebsd.org
Subject:   Re: gunzip | tar reports broken pipe during OOO build on amd64.
Message-ID:  <4A034594.4010405@freebsd.org>
In-Reply-To: <20090507193213.GC70931@wep4035.physik.uni-wuerzburg.de>
References:  <20090505174831.GA40305@wep4035.physik.uni-wuerzburg.de> <3GBQgy9AhtC1kpgclCTM4BIxKP8@AbNt2aYVonA6XSQc9As8EVwIk24> <20090506032832.GB45796@wep4035.physik.uni-wuerzburg.de> <92cd2ff70905060501vaaf67bdnaee1be72e04f1ef8@mail.gmail.com> <20090506192603.GA56228@wep4035.physik.uni-wuerzburg.de> <4A031FB6.2050907@freebsd.org> <20090507184121.GA70931@wep4035.physik.uni-wuerzburg.de> <20090507193213.GC70931@wep4035.physik.uni-wuerzburg.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexey Shuvaev wrote:
> On Thu, May 07, 2009 at 08:41:21PM +0200, Alexey Shuvaev wrote:
>> On Thu, May 07, 2009 at 10:51:50AM -0700, Tim Kientzle wrote:
>>> I finally reproduced this; it seems to only happen with
>>> /bin/csh.  It does not happen with /bin/sh or bash.
>>>
>>> Also, in /bin/csh, this works:
>>>
>>> (gunzip -c ooo_crystal_images-1.tar.gz | tar xf -) && echo OK
>>>
>>> and this fails:
>>>
>>> gunzip -c ooo_crystal_images-1.tar.gz | (tar xf -) && echo OK
>>>
>> Do you mean it is a bug in [t]csh?

No, this is definitely a bug in tar.  I finally
found the place where tar was not always reading
beyond end-of-archive on a pipe.

This doesn't show up under /bin/sh or bash
because for those shells, the return status
of "gunzip|tar" is the exit status of the last
command ("tar").  For csh, the return
status of the pipeline is the return status
of the first command.

So for other shells, the SIGPIPE exit from
gunzip doesn't cause the whole sequence to fail
(because "tar" exits with success).

I'm testing a fix now; it will be committed
later today.

Tim




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A034594.4010405>