[BusyBox] ctrl+c not working for bash
pgf at brightstareng.com
Thu Aug 18 14:53:00 UTC 2005
> Quoting prashant waman <kiranprashant at yahoo.com>:
> > > What is /dev/c1? If it is the same as /dev/console,
> > > forget about 'Ctrl-C'
> > yes /dev/c1 is a /dev/console.
> OK, Job control is not supported on /dev/console (kernel
> internals limitation. I guess you could try to enforce it if
> you modify your kernel sources).
well, i'm not going to pretend to be familiar with all the
details here (since i wasn't aware until recently that the
console was so so different than a tty), but if you run the shell
in its own session and set a controlling tty, then job control
and interrupt handling work just fine on the console. isn't this
just a controlling tty issue?
so, if you're running a new (from svn) busybox, and you configure
with CONFIG_FEATURE_INIT_SCTTY, you'll get this:
If this option is enabled a command starting with hyphen (-)
is run in its own session (setsid(2)) and possibly with a
controlling tty (TIOCSCTTY). This not the traditional init
behavour, but is often what you want in an embedded system where
the console is only accessed during development or for maintenance.
which means that the line:
would work as prashant expected it to (if using the busybox init --
he's not, though).
(rob mentioned this in another message that i just got -- but i
believe the thing about setting the controlling tty is only done
CONFIG_FEATURE_INIT_SCTTY is configured.)
paul fox, pgf at brightstareng.com
More information about the busybox