bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] grep: don't say "write error" over and over


From: Paul Eggert
Subject: Re: [PATCH 1/4] grep: don't say "write error" over and over
Date: Tue, 07 Feb 2012 22:21:01 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0

On 01/20/2012 11:06 PM, Paul Eggert wrote:
> I took a look and came up with four related patches to fix these.
> Here's the first one.  It fixes the originally-reported bug.

I found a problem in that patch's test case: it assumes
that SIGPIPE has the default action when the test is
run, which isn't a portable assumption.  I installed the
following further patch to fix this bug in the test case.

tests: work even if SIGPIPE is ignored
* tests/epipe: Do not infinite-loop if SIGPIPE is already ignored.
It could be that the invoker of 'make check' ignores SIGPIPE,
for example.
diff --git a/tests/epipe b/tests/epipe
index 336d994..f9cb3f6 100755
--- a/tests/epipe
+++ b/tests/epipe
@@ -6,7 +6,7 @@

 if
    (
-     while :; do echo x; done |
+     (trap - PIPE; while echo x; do :; done) 3>&- |
      (trap '' PIPE; exec grep x 2>&3) |
      :
    ) 3>&1 | (



reply via email to

[Prev in Thread] Current Thread [Next in Thread]