[Top][All Lists]

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

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

From: Bob Proulx
Subject: Re: [BUG] Bash not reacting to Ctrl-C
Date: Wed, 9 Feb 2011 14:18:20 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

Ingo Molnar wrote:
> Could you try the reproducer please?
> Once you run it, try to stop it via Ctrl-C, and try to do this a
> couple of times.

I was not able to reproduce your problem using your (I believe to be
slightly incorrect) test case:

  bash -c 'while true; do /bin/true; done'

It was always interrupted with a single control-C on my amd64 Debian
Squeeze machine.  I expect this means that by chance it was always
bash running in the foreground process and /bin/true never happened to
be there at the right time.

> Do you consider it normal that it often takes 2-3 Ctrl-C attempts to
> interrupt that script, that it is not possible to stop the script
> reliably with a single Ctrl-C?

Since the exit status of /bin/true is ignored then I think that test
case is flawed.  I think at the least needs to check the exit status
of the /bin/true process.

  bash -c 'while true; do /bin/true || exit 1; done'


reply via email to

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