GNU bug report logs -
#22067
[bug-diffutils] bug#20062: bug#20062: [PATCH] diff: add support for --color
Previous Next
Reported by: Gisle Vanem <gvanem <at> yahoo.no>
Date: Tue, 1 Dec 2015 09:58:02 UTC
Severity: normal
Tags: patch
Done: Jim Meyering <jim <at> meyering.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Giuseppe Scrivano <gscrivano <at> gnu.org> writes:
> Bug 3 is a bug on all platforms, set_color_context should call
> process_signals only when color_context != RESET_CONTEXT. I'll send a
> patch for that.
I've attached a patch for this bug.
Regards,
Giuseppe
[0001-Fix-an-infinite-recursion-with-color.patch (text/x-patch, inline)]
From c9326d016a05c594b8cd2f19effe792c23fde3ef Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivano <at> gnu.org>
Date: Mon, 1 Feb 2016 09:58:52 +0100
Subject: [PATCH] Fix an infinite recursion with --color
* src/util.c: Call process_signals only when color_context is not
RESET_CONTEXT.
Reported by Gisle Vanem in http://debbugs.gnu.org/22067
---
src/util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util.c b/src/util.c
index bf9ed97..26615ca 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1349,7 +1349,8 @@ static enum color_context last_context = RESET_CONTEXT;
void
set_color_context (enum color_context color_context)
{
- process_signals ();
+ if (color_context != RESET_CONTEXT)
+ process_signals ();
if (colors_enabled && last_context != color_context)
{
put_indicator (&color_indicator[C_LEFT]);
--
2.5.0
This bug report was last modified 9 years and 69 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.