[BusyBox] ash -> do while true -> ctrl+c
Vladimir N. Oleynik
dzo at simtreas.ru
Thu Apr 18 09:23:03 UTC 2002
Giulio,
> Latest cvs busybox, against uClibc or glibc 2.1.2
>
> ==== You cannot stop this with ctrl+c
> #!/bin/sh
> while true
> do
> echo "In while true"
> sleep 1
> done
> ====
>
> unless you add
> trap "exit 0" 2
> at the top
>
> Normal shell will exit if it gets a ctrl+c inside the loop.
Ohhh.
It was necessary to work, while searched and guessed the reason of it.
I do not know, who when added or removed this additional subtlety.
The source text busybox ash strongly differs now at ash in debian and NetBSD.
If i change:
if (intreceived && trap[SIGINT]) kill(getpid(), SIGINT);
to:
if (intreceived /*&& trap[SIGINT]*/) kill(getpid(), SIGINT);
your test work fine. But you see someone has brought in this code SPECIALLY!? :0
--w
vodz
More information about the busybox
mailing list