X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0	tests=AWL,BAYES_00,SPF_HELO_PASS,TVD_RCVD_IP
X-Spam-Check-By: sourceware.org
Date: Mon, 5 Dec 2011 23:11:21 -0800 (PST)
From: "Peter A. Castro" <doctor@fruitbat.org>
To: Thomas Hafner <{^_^}@hafner.NL.EU.ORG>
cc: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: 1.7.9: zsh, "unexpected end of file"
In-Reply-To: <20111130204840.8840E1412D4@faun.hafner.NL.EU.ORG>
Message-ID: <alpine.LNX.2.00.1112052258320.3448@gremlin.fruitbat.org>
References: <20111130204840.8840E1412D4@faun.hafner.NL.EU.ORG>
User-Agent: Alpine 2.00 (LNX 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, 30 Nov 2011, Thomas Hafner wrote:

> Hello,

Greetings, Thomas,
   (sorry for the late reply)

> could zsh be repaired such that it behaves successfully like bash?
> Here goes the problem description.
>
> 1. In shell /usr/bin/zsh-4.3.12.exe:
>  gunzip < r1s.gz > r1s
>  - Expected: unpack to r1s
>  - Observed: command fails with output "gzip: stdin: unexpected end of
>    file"
> 2. However this works:
>  gunzip r1s.gz
> 3. If I repeat 1. with bash rather than zsh, it works.
>
> The file r1s.gz can be get there http://tinyurl.com/bs7kefh .

Most curious.
I can repro your symptoms.  However, the following combinations do work:

   cat r1s.gz | gunzip > r1s
   zcat r1s.gz > r1s

It seems only directly re-directing stdin fails.

Hmm...there's something rather strange about this specific .gz file of
yours.  I'll have to analyse it a little more to determine what's going
on.  On a guess, I'd say there's a control sequence in it that's tickling
the I/O handler in some interesting way.

How, exactly, (if I may ask), did you create this file?
It looks like random noise to me.

> Regards
>  Thomas Hafner

-- 
Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com>
 	"Cats are just autistic Dogs" -- Dr. Tony Attwood

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

