diff options
author | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1999-03-02 22:51:33 +0000 |
---|---|---|
committer | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1999-03-02 22:51:33 +0000 |
commit | e9ebcd1359d1d362510b0568e03f87efc1fe0233 (patch) | |
tree | e458db930cab994e92bc40951d3aa91a8d9d2005 | |
parent | 5b44c275f5d8305fc50a68675e62f63c6c944f93 (diff) | |
download | grep-e9ebcd1359d1d362510b0568e03f87efc1fe0233.tar.gz |
updates.
drain stdin.
* configure.in : Change the configure VC test from
'test x$ac_cv_prog_CC = xcl;' to 'test x"$ac_cv_prog_CC" = xcl;'
Email from Joshua R. Poulson.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | tests/bre.awk | 2 | ||||
-rw-r--r-- | tests/ere.awk | 2 | ||||
-rw-r--r-- | tests/spencer1.awk | 2 |
4 files changed, 13 insertions, 3 deletions
@@ -1,5 +1,15 @@ 1999-02-23 Alain Magloire + * tests/*.awk : The problem is that grep does not drain its stdin, + thus the previous process in the pipeline receives a SIGPIPE. + Other shells are silent about this. There is actually no failure, + since the broken pipe is expected. You can work around it by + changing the pipeline, so that the input is drained, like this: + echo '-' | { ${GREP} -E -e pattern >/dev/null 2>&1; cat >/dev/null; } + Email exchange with Andreas Schwab. + +1999-02-23 Alain Magloire + * src/grep.c : Restrict the use of -E, -F, -G to only grep driver, Posix behaviour. {f,e}grep the matcher is already set. This change may brake diff --git a/tests/bre.awk b/tests/bre.awk index 39730713..025d4a44 100644 --- a/tests/bre.awk +++ b/tests/bre.awk @@ -8,7 +8,7 @@ BEGIN { $0 ~ /^#/ { next; } NF == 3 { - printf ("echo '%s' | ${GREP} -e '%s' > /dev/null 2>&1\n",$3, $2); + printf ("echo '%s' | { ${GREP} -e '%s' > /dev/null 2>&1 ; cat > /dev/null }\n",$3, $2); printf ("if test $? -ne %s ; then\n", $1); printf ("\techo Spencer bre test \\#%d failed\n", ++n); printf ("\tfailures=1\n"); diff --git a/tests/ere.awk b/tests/ere.awk index c014fe9a..b790ee2a 100644 --- a/tests/ere.awk +++ b/tests/ere.awk @@ -8,7 +8,7 @@ BEGIN { $0 ~ /^#/ { next; } NF == 3 { - printf ("echo '%s' | ${GREP} -E -e '%s' > /dev/null 2>&1\n",$3, $2); + printf ("echo '%s' | { ${GREP} -E -e '%s' > /dev/null 2>&1 ; cat > /dev/null }\n",$3, $2); printf ("if test $? -ne %s ; then\n", $1); printf ("\techo Spencer ere test \\#%d failed\n", ++n); printf ("\tfailures=1\n"); diff --git a/tests/spencer1.awk b/tests/spencer1.awk index b66b8f5f..05603bee 100644 --- a/tests/spencer1.awk +++ b/tests/spencer1.awk @@ -4,7 +4,7 @@ BEGIN { } $0 !~ /^#/ && NF = 3 { - printf ("echo '%s'|${GREP} -E -e '%s' > /dev/null 2>&1\n",$3, $2); + printf ("echo '%s'| { ${GREP} -E -e '%s' > /dev/null 2>&1 ; cat /dev/null }\n",$3, $2); printf ("if test $? -ne %s ; then\n", $1); printf ("\techo Spencer test \\#%d failed\n", ++n); printf ("\tfailures=1\n"); |