[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix exit status of signal handlers in shell scripts
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH] Fix exit status of signal handlers in shell scripts |
Date: |
Sun, 31 Jan 2010 17:27:24 +0100 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
Hi Bruno,
thanks for the additional information.
* Bruno Haible wrote on Sun, Jan 31, 2010 at 12:32:06PM CET:
> Ralf Wildenhues asked:
> > What are the "other cases" you mention, where no process was terminated
> > by the signal, but the signal delivered somewhere nonethess?
>
> When I run
> $ while /bin/true; do /bin/true; done
> and I want to interrupt it with Ctrl-C, sometimes I have to press Ctrl-C
> twice:
>
> $ while /bin/true; do /bin/true; done
> ^C
> $ while /bin/true; do /bin/true; done
> ^C^C
Are you saying that this too is expected behavior? As far as I
understood now, the above is a separate issue, and a bug, either
in the shell or the kernel/libc, no?
> Similarly with a 'trap' handler installed:
>
> $ (trap 'echo caught SIGINT; exit 130' 2; while /bin/true; do /bin/true; done)
> ^Ccaught SIGINT
> $ (trap 'echo caught SIGINT; exit 130' 2; while /bin/true; do /bin/true; done)
> ^C^Ccaught SIGINT
Thanks,
Ralf (don't have my copy of APUE here right now)
- Re: [PATCH] Fix exit status of signal handlers in shell scripts, (continued)