summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <bero@arklinux.org>2002-03-26 14:42:33 +0000
committerBernhard Rosenkraenzer <bero@arklinux.org>2002-03-26 14:42:33 +0000
commit68f0ed745a13e596081f9a6c97c816f1bdc612aa (patch)
tree5979008e1cfd130ddd61ceddaa6bfd55c95cc2be
parentddb00719a994ae277bbe7e1dc7f5063cefad802e (diff)
downloadgrep-68f0ed745a13e596081f9a6c97c816f1bdc612aa.tar.gz
Fix https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=61705
* src/grep.c: Don't fail if we don't have an stdout fd and -q is used (happens e.g. on calls from hotplug scripts)
-rw-r--r--ChangeLog4
-rw-r--r--src/grep.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 020ec565..233dc215 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-03-26 Bernhard Rosenkraenzer <bero@redhat.com>
+ * src/grep.c: Don't fail if we don't have an stdout fd and -q
+ is used (happens e.g. on calls from hotplug scripts)
+
2002-03-14 Bernhard Rosenkraenzer <bero@redhat.com>
* src/Makefile.am, po/Makefile.in.in: Support DESTDIR properly
* tests/bre.tests: Add fix from
diff --git a/src/grep.c b/src/grep.c
index 4239b0b4..d2b64ba6 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1519,6 +1519,7 @@ main (int argc, char **argv)
case 'q':
exit_on_match = 1;
+ close_stdout_set_status(0);
break;
case 'R':