|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#23316: closed (gzip-1.7: gzip -l issue when piping) |
Date: | Wed, 20 Apr 2016 00:50:02 +0000 |
Your message dated Tue, 19 Apr 2016 17:49:35 -0700 with message-id <address@hidden> and subject line Re: bug#23314: gzip-1.7-1 regression: cannot redirect output of gzip -l has caused the debbugs.gnu.org bug report #23314, regarding gzip-1.7: gzip -l issue when piping to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 23314: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23314 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: gzip-1.7: gzip -l issue when piping Date: Tue, 19 Apr 2016 02:12:43 -0400 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 Hi,There is a problem with gzip-1.7 when piping output with the 'list' option. Specifically, bothgzip -l file.gz > output and gzip -l file.gz | grep -q pattern ... produce gzip: write error: Bad file descriptor This issue is due to the following code (I assume to the close()): gzip-1.7/gzip.c:670 670 if (to_stdout 671 && ((synchronous 672 && (fdatasync (STDOUT_FILENO) != 0 && errno != EINVAL)) 673 || close (STDOUT_FILENO) != 0) 674 && errno != EBADF) 675 write_error (); In the cases above, to_stdout=1, and synchronous=0. The issue appears to be 'list' specific, eg, gzip -dc file.gz | grep -q pattern ... looks ok. Perhaps line 670 should be: 670 if (!list && to_stdout or, not set to_stdout in the list case ? Not sure.. thanks, John Thanks, John
--- End Message ---
--- Begin Message ---Subject: Re: bug#23314: gzip-1.7-1 regression: cannot redirect output of gzip -l Date: Tue, 19 Apr 2016 17:49:35 -0700 Thanks for reporting the problem. I installed the attached gzip patch on savannah. User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 0001-gzip-fix-bug-with-l-output-to-pipes.patch
Description: Source code patch
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |