| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| To: | cygwin AT cygwin DOT com |
| From: | Eric Blake <ebb9 AT byu DOT net> |
| Subject: | Re: 1.5.24: data corruption problem with popen and gzip on a text mounted filesystem |
| Date: | Mon, 23 Jul 2007 19:56:48 +0000 (UTC) |
| Lines: | 19 |
| Message-ID: | <loom.20070723T215438-835@post.gmane.org> |
| References: | <46A4BC14 DOT 1050603 AT merl DOT com> <46A4ED4A DOT 9060303 AT merl DOT com> |
| Mime-Version: | 1.0 |
| User-Agent: | Loom/3.14 (http://gmane.org/) |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Hugh Secker-Walker <hugh <at> merl.com> writes:
> 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.
It looks like dd currently honors mount points. You would need to use:
popen("gzip | dd of=outputfile oflag=binary", "wb")
to guarantee binary writes. But I thought at one point I had patched dd to
default to binary unless you used oflag=text; I'll have to investigate.
--
Eric Blake
volunteer cygwin coreutils maintainer
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |