This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mintty, xterm and rxvt freezes when displaying a binary stream


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]