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 21:16:19 -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/11/11 4:00 PM, Oleg Nesterov wrote:

> I already tried to discuss this, but you didn't reply ;) See
> http://www.mail-archive.com/address@hidden/msg08528.html
> 
> So, if I understand correctly, you mean that
> 
>       #!/bin/sh
> 
>       interactive_application
> 
>       echo DONE
> 
> shouldn't be interrupted by SIGINT after interactive_application exits.
> For example, it can be a text-editor which treats SIGINT specially.
> 
> But, in this case, shouldn't we fix the script above? In this case
> the shell and the application should not run in the same tty->pgrp
> group, or we can add "trap SIGINT".

That's not a scalable solution, and doesn't take into account all programs
that use SIGINT as a normal part of their processing and all scripts that
might call them.

I would argue that the intended bash behavior, modulo any race conditions
that exist, is what the user expects to happen.

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



reply via email to

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