[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v2.22-11-g450c112
From: |
Paul Eggert |
Subject: |
grep branch, master, updated. v2.22-11-g450c112 |
Date: |
Thu, 31 Dec 2015 08:25:09 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via 450c11293bd54b9e630f2bab26706d13b584de07 (commit)
from 0e90bf6d6802780394ed607510549b8530fe9e89 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=450c11293bd54b9e630f2bab26706d13b584de07
commit 450c11293bd54b9e630f2bab26706d13b584de07
Author: Paul Eggert <address@hidden>
Date: Thu Dec 31 00:20:54 2015 -0800
grep: fix -l --line-buffer bug
Problem reported by Louis Sautier in: http://bugs.gnu.org/18750
* NEWS: Document this.
* src/grep.c (grep, grepdesc): If --line-buffered, flush
stdout after outputting newline (or null byte, if applicable).
diff --git a/NEWS b/NEWS
index 4bf408c..b451d76 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,9 @@ GNU grep NEWS -*- outline
-*-
This partly reverts the --exclude-related change in 2.22.
[bug introduced in grep-2.22]
+ --line-buffer is no longer ineffective when combined with -l
+ [bug introduced in grep-2.5]
+
* Noteworthy changes in release 2.22 (2015-11-01) [stable]
diff --git a/src/grep.c b/src/grep.c
index 03a1bff..06f3345 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1481,7 +1481,11 @@ grep (int fd, struct stat const *st)
done_on_match = done_on_match_0;
out_quiet = out_quiet_0;
if ((has_nulls || encoding_error_output) && !out_quiet && nlines != 0)
- printf (_("Binary file %s matches\n"), filename);
+ {
+ printf (_("Binary file %s matches\n"), filename);
+ if (line_buffered)
+ fflush (stdout);
+ }
return nlines;
}
@@ -1725,6 +1729,8 @@ grepdesc (int desc, bool command_line)
fputc (0, stdout);
}
printf ("%" PRIdMAX "\n", count);
+ if (line_buffered)
+ fflush (stdout);
}
status = !count;
@@ -1732,6 +1738,8 @@ grepdesc (int desc, bool command_line)
{
print_filename ();
fputc ('\n' & filename_mask, stdout);
+ if (line_buffered)
+ fflush (stdout);
}
if (desc == STDIN_FILENO)
-----------------------------------------------------------------------
Summary of changes:
NEWS | 3 +++
src/grep.c | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v2.22-11-g450c112,
Paul Eggert <=