1.5.24: data corruption problem with popen and gzip on a text ?mounted filesystem

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Mon Jul 23 21:26:00 GMT 2007


On Mon, Jul 23, 2007 at 05:16:26PM +0000, Eric Blake wrote:
>Christopher Faylor <cgf-use-the-mailinglist-please <at> cygwin.com> writes:
>>gzip is linked with binmode.o, like most of the things that I maintain
>>(i.e., no upstream patch really necessary - isn't that my call?).  If I
>>use a really simple test case of just outputting directly to a text
>>mode mount, it works fine.

>
>binmode.o to the contrary, there is indeed a problem:
>
>$ cd text
>$ ls
>$ strace -o traceA /bin/ls > /dev/null
>$ cp traceA traceB
>$ gzip < traceA > traceA.gz
>$ gzip < traceB | cat > traceB.gz
>$ ls -l
>total 88
>-rwxr-xr-x 1 eblake Domain Users 33136 Jul 23 11:12 traceA*
>-rw-r--r-- 1 eblake Domain Users  7067 Jul 23 11:12 traceA.gz
>-rwxr-xr-x 1 eblake Domain Users 33136 Jul 23 11:12 traceB*
>-rw-r--r-- 1 eblake Domain Users  7033 Jul 23 11:12 traceB.gz
>
>traceA.gz has 34 spurious \r characters.

I guess my test case was small enough that this didn't matter.  If I made
the file bigger I can see the problem.

I'll update gzip ASAP.

cgf

--
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/



More information about the Cygwin mailing list