X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=rq
	OiYRierAvTGe6xjSFNzcVrQy+wrTcHMKPzTCqj/3F8qMDbAyd0XbWMnKajc6nlYN
	tLZvmIdCH/46Q3ka8sCoCXsOZUgacWUDUfmM1uUfhKi/pjmNImNGfRHWp3VyTz+5
	HtcaPr9LqfyzFRgVjSeZlxIkCTqyk6jZ1dF8SJ82M=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=+kVBzp9w
	FfpTXGcPizDwq0Aui+o=; b=JRcEbUZNKyDT3qDL9Lb7G6TjV0Osx0ojnQKscSE7
	gW2SWFzVnPa3lAnGr1qBx50+rxvMbt438INbn/VVTofqwsRH667+lIndsBcbbJbf
	459LFwiZR/BeH8SLzrM55V36tiUmBN9XSI1Kbg4HsTbbOY8NnjxwzbQKw17Li/3j
	yxI=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS,TW_RX autolearn=ham version=3.3.1
MIME-Version: 1.0
X-Received: by 10.180.74.172 with SMTP id u12mr2586091wiv.0.1368506357894; Mon, 13 May 2013 21:39:17 -0700 (PDT)
In-Reply-To: <CAKepmah+q7ESj4cUQi-MDaPkk+GBdXo-S+b2eeYCRqkxhG7rKg@mail.gmail.com>
References: <CAP_kE8UJZYf2ebrpDSKtkTrN2p0yT997+y+Z5tr978LNdbTekw@mail.gmail.com>	<CAHWeT-Z=oQ+Xan7DuRkC1A_7RLAQ5+3oWXQJKDiyPchzyXruQA@mail.gmail.com>	<CAKepmah+q7ESj4cUQi-MDaPkk+GBdXo-S+b2eeYCRqkxhG7rKg@mail.gmail.com>
Date: Tue, 14 May 2013 05:39:17 +0100
Message-ID: <CAHWeT-bSaOUxsACWtFmWaRnhobu22DXrVFa6+6+jqwNdZQhvHw@mail.gmail.com>
Subject: Re: mintty, xterm and rxvt freezes when displaying a binary stream
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8

On 14 May 2013 01:23, Jack Adrian Zappa wrote:
> On Mon, May 13, 2013 at 5:45 PM, Andy Koppe wrote:
>>
>> On 13 May 2013 22:35, Adrian H wrote:
>> > I inadvertently dumped a binary stream to the terminal and it froze
>> > mintty.  When I tried to kill the process dumping the data, it
>> > wouldn't die, even when using -9 switch.  When I used Process Explorer
>> > to kill it, it died and mintty resumed working.
>>
>> http://cygwin.com/ml/cygwin/2013-04/msg00362.html
>
>
> Sounds like its related, however, if I only send 369 of the 370 lines,
> it is fine and the characters sent to the terminal end up on my
> command line.  I.e. I get this on my command line after the cat of 369
> lines.
>
> $ 1;2c1;2c1;2c
>
> Which is part of the return string sans the leading "\x5b\x3f" a.k.a.
> "\e[".

The "\e[" is swallowed by bash/readline.

> According to that link, you provided, it sounds like only one
> key is necessary to cause this problem.

It also requires a large amount of output from the application, so
that the pty's output buffer overflows and hence the application's
write() to it blocks.

> In any case, how does Linux deal with this issue?

I don't know. A buffer on the terminal's side of the pty? Automatic
deadlock detection in the kernel, causing one of the blocking writes
to fail?

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

