From owner-freebsd-stable@FreeBSD.ORG Sat Nov 27 09:07:58 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C07A16A4CE for ; Sat, 27 Nov 2004 09:07:58 +0000 (GMT) Received: from orb.pobox.com (orb.pobox.com [207.8.226.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id B15C243D48 for ; Sat, 27 Nov 2004 09:07:57 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from orb (localhost [127.0.0.1]) by orb.pobox.com (Postfix) with ESMTP id 8A32F2FB45F; Sat, 27 Nov 2004 04:07:56 -0500 (EST) Received: from billdog.local.linnet.org (dsl-212-74-113-65.access.uk.tiscali.com [212.74.113.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by orb.sasl.smtp.pobox.com (Postfix) with ESMTP id 4578C2FB444; Sat, 27 Nov 2004 04:07:55 -0500 (EST) Received: from brian by billdog.local.linnet.org with local (Exim 4.43 (FreeBSD)) id 1CXyYc-0000C8-3O; Sat, 27 Nov 2004 09:07:54 +0000 Date: Sat, 27 Nov 2004 09:07:54 +0000 From: Brian Candler To: Edwin Groothuis , freebsd-stable@freebsd.org Message-ID: <20041127090754.GB730@uk.tiscali.com> References: <20041126140751.GA1996@uk.tiscali.com> <20041127005215.GA1108@k7.mavetju> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041127005215.GA1108@k7.mavetju> User-Agent: Mutt/1.4.2.1i Subject: Re: Bug in xterm? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 09:07:58 -0000 On Sat, Nov 27, 2004 at 11:52:15AM +1100, Edwin Groothuis wrote: > [~] edwin@k7>perl -mDigest::MD5 -e 'print pack("H*",Digest::MD5::md5("test"))' | hexdump -C > 00000000 9f 4d f1 3c ae 73 67 46 |.M.<.sgF| > > This shows that it outputs some high-ascii data, which causes the > xterm to stop output. If you do "echo hi > /tmp/aaa" while in this > state (be alert for typos), you see that it still accepts commands, > but doesn't show them anymore. Thanks. I got a nice analysis off-list: -------------------------------------------------------------------------- >$ perl -mDigest::MD5 -e 'print pack("H*",Digest::MD5::md5("test"))' >ert >$ wc ert > 0 1 8 ert >$ hexdump -C ert >00000000 9f 4d f1 3c ae 73 67 46 |.M.<.sgF| >00000008 >$ cat ert > >At this point it hangs; sending ^Q doesn't help. But if you press cursor-up >a few times it comes back to life. > >It must be a strange escape sequence if typing characters and hitting Return >lots of times is not enough to bring it back to life. I suppose it's >technically not an escape sequence, since it doesn't include 0x1B :-) 0x9f is APC - which begins a string. Technically it's only terminated by a ST (0x9c or ESC followed by backslash), but xterm also accepts a BEL, which may be what's emitted when you do a few uparrows (getting an error response from the shell). There's also a resource setting to work around some Linux junk (hardcoded applications with malformed sequences) that can make it terminate on a carriage return. But generally, it would look as if it's hung. (A soft-reset would fix the problem with less damage to your session). Oddly, a real vt220 would do the same thing, but neither has any use for the content of the string. -------------------------------------------------------------------------- I guess I wasn't expecting any escape sequence which consumed an infinite number of characters - and presumably also, Konsole implements a different terminal emulation (or implements vt220 wrongly). Cheers, Brian.