GNU bug report logs - #21461
grep --color can leave terminal in weird state after signal

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: grep; Reported by: Paul Eggert <eggert@HIDDEN>; dated Fri, 11 Sep 2015 16:53:02 UTC; Maintainer for grep is bug-grep@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Sep 2015 16:52:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 11 12:52:02 2015
Received: from localhost ([127.0.0.1]:57158 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZaRYQ-0005rF-BE
	for submit <at> debbugs.gnu.org; Fri, 11 Sep 2015 12:52:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35782)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eggert@HIDDEN>) id 1ZaRYN-0005qy-Lv
 for submit <at> debbugs.gnu.org; Fri, 11 Sep 2015 12:52:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eggert@HIDDEN>) id 1ZaRYM-00047o-PE
 for submit <at> debbugs.gnu.org; Fri, 11 Sep 2015 12:51:59 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59928)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <eggert@HIDDEN>) id 1ZaRYM-00047k-MS
 for submit <at> debbugs.gnu.org; Fri, 11 Sep 2015 12:51:58 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45783)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <eggert@HIDDEN>) id 1ZaRYL-0004VW-RO
 for bug-grep@HIDDEN; Fri, 11 Sep 2015 12:51:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eggert@HIDDEN>) id 1ZaRYG-00046W-OW
 for bug-grep@HIDDEN; Fri, 11 Sep 2015 12:51:57 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48432)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <eggert@HIDDEN>) id 1ZaRYG-00045V-GG
 for bug-grep@HIDDEN; Fri, 11 Sep 2015 12:51:52 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 84C4E161074
 for <bug-grep@HIDDEN>; Fri, 11 Sep 2015 09:51:50 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id 5hHvJOsr7qbB for <bug-grep@HIDDEN>;
 Fri, 11 Sep 2015 09:51:48 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id CCB5F161076
 for <bug-grep@HIDDEN>; Fri, 11 Sep 2015 09:51:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 5l4OVJeRNRxE for <bug-grep@HIDDEN>;
 Fri, 11 Sep 2015 09:51:48 -0700 (PDT)
Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net
 [100.32.155.148])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 91D15161074
 for <bug-grep@HIDDEN>; Fri, 11 Sep 2015 09:51:48 -0700 (PDT)
To: grep bugs <bug-grep@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Subject: grep --color can leave terminal in weird state after signal
Organization: UCLA Computer Science Department
Message-ID: <55F306A3.5070405@HIDDEN>
Date: Fri, 11 Sep 2015 09:51:47 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.2.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

If grep --color is interrupted, either via ^C or ^Z or some other signal, it can 
leave the output terminal in a weird state.  This problem was noted by Giuseppe 
Scrivano in <http://bugs.gnu.org/20062#143> and I'm forwarding the report here. 
  One fix would be to do what GNU 'ls' does; note that SIGTSTP must be treated 
specially so that the color state resumes after restart; also, the signal 
handler just sets a flag that is polled periodically by the main code.




Acknowledgement sent to Paul Eggert <eggert@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-grep@HIDDEN. Full text available.
Report forwarded to bug-grep@HIDDEN:
bug#21461; Package grep. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.