[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:20:10 -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 6:35 PM, Linus Torvalds wrote:
> On Fri, Feb 11, 2011 at 1:30 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> The other case is that the child process was quick and already exited.
>> You get ^C, but the child never did. When you do the waitpid(), you'll
>> never get the EINTR, because there was no actual wait.
>
> Ok, so here's a suggested patch. It took much longer than expected,
> because I found another independent race while trying to fix this:
> bash did the "restore_sigint_handler()" _after_ having already tested
> the "wait_sigint_received" value, so what could happen is that the
> SIGINT would happen _after_ the test of that flag, but before the
> signal handler was restored, so bash would (once more) drop the ^C on
> the floor.
The patch looks good. I'll take a closer look and probably produce a
patch for bash-4.2 based on it. Thanks for taking a look.
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/
- Re: [BUG] Bash not reacting to Ctrl-C, (continued)
- Re: [BUG] Bash not reacting to Ctrl-C, Linus Torvalds, 2011/02/11
- Re: [BUG] Bash not reacting to Ctrl-C, Chet Ramey, 2011/02/11
- Re: [BUG] Bash not reacting to Ctrl-C, Oleg Nesterov, 2011/02/11
- Re: [BUG] Bash not reacting to Ctrl-C, Chet Ramey, 2011/02/11
- Re: [BUG] Bash not reacting to Ctrl-C, Oleg Nesterov, 2011/02/11
- Re: [BUG] Bash not reacting to Ctrl-C, Linus Torvalds, 2011/02/11
- Re: [BUG] Bash not reacting to Ctrl-C, Linus Torvalds, 2011/02/11
- Re: [BUG] Bash not reacting to Ctrl-C, Oleg Nesterov, 2011/02/13
- Re: [BUG] Bash not reacting to Ctrl-C,
Chet Ramey <=
- Re: [BUG] Bash not reacting to Ctrl-C, Chet Ramey, 2011/02/28
- Re: [BUG] Bash not reacting to Ctrl-C, Linus Torvalds, 2011/02/11
- Re: [BUG] Bash not reacting to Ctrl-C, Chet Ramey, 2011/02/28
- Re: [BUG] Bash not reacting to Ctrl-C, Chet Ramey, 2011/02/28
- Re: [BUG] Bash not reacting to Ctrl-C, Oleg Nesterov, 2011/02/09
- Re: [BUG] Bash not reacting to Ctrl-C, Ingo Molnar, 2011/02/09
- Re: [BUG] Bash not reacting to Ctrl-C, Chet Ramey, 2011/02/28
- Re: [BUG] Bash not reacting to Ctrl-C, Bob Proulx, 2011/02/09
- Re: [BUG] Bash not reacting to Ctrl-C, Oleg Nesterov, 2011/02/09
- Re: [BUG] Bash not reacting to Ctrl-C, Chet Ramey, 2011/02/28