How to disable Ctrl-C during init (initial ramdisk / normal init)
Bernhard Fischer
rep.nop at aon.at
Mon May 22 17:36:55 UTC 2006
On Mon, May 22, 2006 at 06:26:39PM +0200, Yoann Allain wrote:
>Hello,
>
>Although I found many subjects related to 'Ctrl-C doesn't work', I
>didn't find one to explain how to ignore these signals during init with
>Busybox.
>I would like to avoid any Ctrl-C interrupt the different scripts used
>during init of the system.
>I tried using the "trap" command in my shells scripts but I can still
>stop the system init either in my rcS script-shell or in in my linuxrc
>embedded in the initial ramdisk.
>
>I didn't find any configuration option for this purpose so I think that
>the only way to do it is to modify busybox. But perhaps it is simply
>impossible to do because of others issues that I am not aware of...
>
>Does anyone have an idea about this problem?
Works for me in ash..
$ cat sleep.sh
#echo "ignoring ctrl-c in this shell only"
#trap ":" INT QUIT TSTP
# or
echo "ignoring ctrl-c in this shell including children"
trap '' INT QUIT TSTP
i=30
while test $i -gt 0;
do
sleep 1
echo -n .
i=$(($i - 1))
done
More information about the busybox
mailing list