[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] Bash not reacting to Ctrl-C
From: |
Oleg Nesterov |
Subject: |
Re: [BUG] Bash not reacting to Ctrl-C |
Date: |
Fri, 11 Feb 2011 18:27:33 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On 02/11, Illia Bobyr wrote:
>
> Do we really need to check wait_sigint_received here?
> If the child exits because of SIGINT was indeed received all the
> processes on the same terminal will also receive it.
Only if SIGINT was sent to pgrp (like ^C sends SIGTERM to the
foreground process group).
> --- bash-4.1/jobs.c~ctrlc_exit_race 2011-02-07 13:52:48.000000000 +0100
> +++ bash-4.1/jobs.c 2011-02-07 13:55:30.000000000 +0100
> @@ -3299,7 +3299,7 @@ set_job_status_and_cleanup (job)
> signals are sent to process groups) or via kill(2) to the foreground
> process by another process (or itself). If the shell did receive the
> SIGINT, it needs to perform normal SIGINT processing. */
> - else if (wait_sigint_received&& (WTERMSIG (child->status) == SIGINT)&&
> + else if ((WTERMSIG (child->status) == SIGINT)&&
The problems is, if WTERMSIG() == SIGINT everything is fine. Quite
contrary, we need to handle the case when the last running command
was _not_ killed but exited on its own.
Oleg.
- Re: [BUG] Bash not reacting to Ctrl-C, (continued)
- Re: [BUG] Bash not reacting to Ctrl-C, Bob Proulx, 2011/02/08
- Re: [BUG] Bash not reacting to Ctrl-C, Oleg Nesterov, 2011/02/08
- Re: [BUG] Bash not reacting to Ctrl-C, Chet Ramey, 2011/02/08
- Re: [BUG] Bash not reacting to Ctrl-C, Ingo Molnar, 2011/02/08
- Re: [BUG] Bash not reacting to Ctrl-C, Chet Ramey, 2011/02/08
- Re: [BUG] Bash not reacting to Ctrl-C, Oleg Nesterov, 2011/02/09
- 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, Linus Torvalds, 2011/02/10
- Re: [BUG] Bash not reacting to Ctrl-C, Illia Bobyr, 2011/02/11
- Re: [BUG] Bash not reacting to Ctrl-C,
Oleg Nesterov <=
- 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/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, 2011/02/28