X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0	tests=AWL,BAYES_00,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Content-Class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: RE: unable to type command into Cygwin after running 'tail'
Date: Thu, 2 Dec 2010 16:21:29 -0600
Message-ID: <786EBDA1AC46254B813E200779E7AD36013E60A7@srv1163ex1.flightsafety.com>
In-Reply-To: <251BBCD7-370F-42F1-8305-01F9E6F87D1E@nozzala.net>
References: <30355317.post@talk.nabble.com>	<4CF70A11.8020604@acm.org>	<76B81B8B64B6254B98733990F38621DA6A77@sron-chi-exc05.ronin.roncap.com>	<4CF7E501.9080901@acm.org>	<4CF7E822.2050705@cwilson.fastmail.fm> <AANLkTi=wA08KmvHj1GmQYL2btTC_UMNyr_2vo-n_h8PA@mail.gmail.com> <251BBCD7-370F-42F1-8305-01F9E6F87D1E@nozzala.net>
From: "Thrall, Bryan" <bryan.thrall@flightsafety.com>
To: <cygwin@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

Heath Kehoe wrote on 2010-12-02:=20
> On Dec 2, 2010, at 1:59 PM, Andy Koppe wrote:
>> On 2 December 2010 18:40, Charles Wilson wrote:
>>> On 12/2/2010 1:27 PM, David Rothenberger wrote:
>>>> Illia Bobyr wrote:
>>>>> On 12/1/2010 8:53 PM, David Rothenberger wrote:
>>>>>> Try typing "reset" or "stty sane" (without the quotes) and pressing
>>>>>> Enter. You won't see what you're typing, but after the shell should
>>>>>> work again.
>>>>>=20
>>>>> Would you, please, elaborate on this a little bit?
>>>>> Maybe a link or a reference that explains why this is happening?
>>>>=20
>>>> I'm sorry, I can't. I don't know why it is happening. I just know how
>>>> to recover from it as a user.
>>>=20
>>> I've noticed that this misbehavior occurs more frequently these days:
>>> ctrl-c'ing some tasks (tail, less, maybe a few others) ends up with
>>> the terminal settings all scrogged up
>>=20
>> FWIW, I can't reproduce this, even if I kill the tail or less with
>> SIGKILL, thus giving them no chance to do any cleanup. (I assume you
>> use 'less -K' to allow it to be ctrl-c'ed?)
>>=20
>> Which shell do people who've seen the problem use? Is it an
>> intermittent issue?
>>=20
>=20
> If you SIGKILL a 'less' while it has the tty set for raw/noecho then
> the tty will stay in that mode. Bash apparently resets the tty to
> normal for you after the process is killed (actually, bash's readline
> normally runs the tty in a psuedo-raw mode [-icanon min=3D1 -echo] as a
> matter of course). If you run 'less' from an 'ash' shell then SIGKILL
> it, the ash shell will need 'stty sane' typed in.
>=20
> Also, the OP said the problem was happening on pipelines like 'tail |
> grep'. Neither tail nor grep muck with tty settings (that I know of),
> so if the tty is ending up with echo disabled, it's got to be the shell
> leaving it that way. Perhaps there's some kind of race condition in the
> shell's signal processing? So again, we'll need to know which shell
> this is happening with and a way to reliably repro the issue to have
> any hope of fixing it.

My shell is bash.

I see the problem rarely after I Ctrl-C out of 'tail -f <filename>' (someti=
mes <filename> is a symlink to the actual file). Most of the time, everythi=
ng works fine, though.
--
Bryan Thrall
FlightSafety International
bryan.thrall@flightsafety.com
=A0=20



--
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

