emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#18750: closed (--line-buffered option doesn't work


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#18750: closed (--line-buffered option doesn't work with --files-with-matches)
Date: Thu, 31 Dec 2015 08:30:02 +0000

Your message dated Thu, 31 Dec 2015 00:29:46 -0800
with message-id <address@hidden>
and subject line Re: --line-buffered option doesn't work with 
--files-with-matches
has caused the debbugs.gnu.org bug report #18750,
regarding --line-buffered option doesn't work with --files-with-matches
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
18750: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18750
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: --line-buffered option doesn't work with --files-with-matches Date: Thu, 16 Oct 2014 23:16:30 +0200
Hi, I'm not quite sure this is a bug but it appears that the
--line-buffered option has no effect when used in conjunction with
--files-with-matches.
Here are some tests I ran with grep 2.20:
$ time for i in {1..100}; do grep --line-buffered -Rl gnome /usr/ |
head -n1 >& /dev/null; done
real    0m54.831s
user    0m37.077s
sys     0m17.550s

$ time for i in {1..100}; do grep -Rl gnome /usr/ | head -n1 >& /dev/null; done
real    0m54.858s
user    0m36.987s
sys     0m17.657s

$ time for i in {1..100}; do grep --line-buffered -R gnome /usr/ |
head -n1 >& /dev/null; done
real    0m7.414s
user    0m4.727s
sys     0m2.613s

Please let me know if line-buffering is supposed to work in that case.

Regards,

Louis



--- End Message ---
--- Begin Message --- Subject: Re: --line-buffered option doesn't work with --files-with-matches Date: Thu, 31 Dec 2015 00:29:46 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 Thanks for the bug report. It also seems to me that --line-buffered should apply to nulls, not newlines, when -z is used. Also, there are a couple of other places where stdout should get flushed after a newline. Perhaps we should use setvbuf instead (is it faster?) when -z is not also used, but right now I just want to get the bug fixed for the next release, so I installed the attached, more-conservative, patch, and am marking this bug as done.

Attachment: 0001-grep-fix-l-line-buffer-bug.patch
Description: Text Data


--- End Message ---

reply via email to

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