bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Bash not reacting to Ctrl-C


From: Chet Ramey
Subject: Re: [BUG] Bash not reacting to Ctrl-C
Date: Mon, 28 Feb 2011 20:42:46 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7

On 2/8/11 3:09 PM, Oleg Nesterov wrote:
> On 02/08, Chet Ramey wrote:
>>
>> On 2/8/11 1:21 PM, Oleg Nesterov wrote:
>>> Hello,
>>>
>>> We believe that the non-interactive bash doesn't handle CTRL-C
>>> correctly, please look into the attached thread from lkml for
>>> more details.
>>
>> Read http://www.cons.org/cracauer/sigint.html
> 
> oooh... it is huge! will try tomorrow.
> 
>> and see if you still
>> feel the same way.
> 
> Which way? ;)
> 
> Please note that I wasn't sure when I sent this bug-report. Although
> as a bash user I certainly dislike the fact you can never interrupt
> the shell script reliably. Lets return to the first example,
> 
>       $ sh -c 'while true; do /bin/true; done'
> 
> Do you think it is OK to miss ^C in this case?

That was kind of a loaded question, wasn't it?  But as I said, it took
me a while to reproduce it.  I was never able to need more than one
or two ^C to kill the loop.

> Once again, I won't persist if you think this is fine, and I'll try
> to read the docs above tomorrow. But I'll appreciate very much if
> you can explain why exactly this is fine. So far I am looking at
> 
>       WUE shell would not have this problem, since they discontinue
>       the script on their own. But as I said, they don't support
>       programs using SIGINT for non-exiting purposes
> 
> part of the documentation, but can't understand.

This was explained later, I think, but the basic idea is that some
programs catch SIGINT and either handle it or exit without killing
themselves with SIGINT.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]