X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
References: <46A4BC14.1050603@merl.com> <46A4ED4A.9060303@merl.com>
Subject: RE: 1.5.24: data corruption problem with popen and gzip on a text  mounted filesystem
Date: Mon, 23 Jul 2007 19:09:30 +0100
Message-ID: <013c01c7cd54$9dabd6e0$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <46A4ED4A.9060303@merl.com>
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 23 July 2007 19:03, Hugh Secker-Walker wrote:

> Interestingly, I had tried popen("gzip | dd of=outputfile", "wb") as a
> lower-level way to avoid what I guessed was a problem with gzip using
> the stdout.  The dd attempt didn't work.  This failure suggests to me
> that dd and gzip experience a similar problem in this popen() context,
> a problem that cat somehow avoids.


  Yeh, 'cat' is special: it absolutely guaranteed 100% always always always
uses bin mode, regardless of mount type, stdio mode, shell
direction/redirection/misdirection and indeed anything else at all.  It's your
get-out-of-jail-free card intended exactly for situations just like this one.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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

