delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/16/01:52:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sat, 16 Nov 2002 01:53:02 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: [RXVT PATCH] Stop potential infinite loop in rxvt
Message-ID: <20021116065302.GA12250@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.5.1i

Steve,
I've been investigating the recent report of a "hang" in rxvt
when you do something like this:

  TERM=linux emacx-nox -q

AFAICT, the problem is that the linux terminfo has some escape sequences
that, IMO, rxvt is interpreting incorrectly.  Specifically, rxvt seems
to be interpreting '^[[?c' as equivalent to '^[[c' when I don't think it
should be.

The '^[[0c' escape sequence is sent by a client to a terminal to find
out what kind of terminal it is using.  rxvt was replying to the
question mark version also.  Then, if the response was echoed, rxvt
would respond to that too and so on, ad infinitum.

The patch below fixes this behavior and also makes sure that rxvt
does not reply to '^[[1c' as if it was '^[[0c'.  Would you consider
applying this patch to the official rxvt source?

AFAICT, the above command failed back in cygwin-1.3.12, too, so this
doesn't seem to be a cygwin problem or, at least, it isn't a recent
one.

cgf

--- old-rxvt-2.7.2/src/command.c	2002-11-16 01:45:50.000000000 -0500
+++ new-rxvt-2.7.2/src/command.c	2002-11-16 01:43:48.000000000 -0500
@@ -2862,7 +2862,7 @@
     case CSI_DA:		/* device attributes */
 	if (priv == '>')	/* secondary device attributes */
 	    tt_printf("\033[>%d;%s;0c", 'R', VSTRING);
-	else
+	else if (!priv && arg[0] == 0)
 	    tt_printf(VT100_ANS);
 	break;
     case CSI_SGR:		/* select graphic rendition */

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019