[BusyBox] ash signal trapping

Peter V. Saveliev peet at peet.spb.ru
Sun Oct 31 12:01:06 UTC 2004


...

Please, help me understand, where the bug is.

On the local machine (bash):

8<--------------------------------------------------------------------
[peet at acer peet]$ cat bala 
#!/bin/sh

echo bala
[peet at acer peet]$ trap ./bala 2
[peet at acer peet]$ bala   <------------- pressing Ctrl-C causes "bala" to display

[peet at acer peet]$ 
8<--------------------------------------------------------------------

On busybox (ash):


8<--------------------------------------------------------------------
/tmp $ cat ./bala 
#!/bin/sh

echo bala
/tmp $ trap ./bala 2
/tmp $    <------------- pressing Ctrl-C doesn't cause "bala" to display
/tmp $    <------------- pressing Ctrl-C doesn't cause "bala" to display
8<--------------------------------------------------------------------

The problem is that I cannot interrupt programs like "vmstat" or "ifstat" by
pressing Ctrl-C. I login via busybox' telnetd, if it can affect.

Thanks for your advise.

-- 
Peter V. Saveliev



More information about the busybox mailing list