Hi Bruno !

On 24-03-2013 18:11 Bruno Cornec <[email protected]> wrote:

>I'll nee to try your advise to see whether I encounter the same
>situation.

Just bring your board/emulator to the situation when CTRL-ALT-DEL does
not work. Then access your system from a console or remote login shelll
and do

$ cat /proc/1/status | grep ^Sig

The given numbers are hex with MSB on the left and LSB on the right,
the bits correspond to the signals with bit #0 not used, bit #1 for
SIGINT, etc. (for a list of signals see "kill -l").

SigPnd = currently pending signals
SigBlk = blocked signals (sigprocmask)
SigIgn = signals with action of SIG_IGN
SigCgt = signals with an installed signal handler

> Is it linked to a specific kernel configuration/version ?

The kernels behave somewhat different depending on versions and I
can't tell you which versions show up the information
in /proc/PID/status, but this signal handling has not much changed
over time and I had such issues from start of 2.2 until current
3.8 kernels.

> Now, how did you unlock your proces (if possible) ?

1) Best is to change software to unblock/enable signal receiption at
it's initialization time.

2) For situations where this it not possible (e.g. Busybox ash) I used
a simple start wrapper to unblock signals. Something like this (untested
and unverified from brain, so double check man pages):

#include <signal.h>

...

register int sig;
struct sigaction sa;

sa.sa_flags = 0;
sa.sa_handler = SIG_DFL;
sigemptyset(&sa.sa_mask);
for( sig=1; sig<=SIGRTMAX; ++sig)
  sigaction(sig, &sa, NULL);
sigprocmask(SIG_SETMASK, &sa.sa_mask, NULL);

...

then exec to your program (execve or corresponding call)

I do not know, if this works with Busybox init. May be init does it's
own interrupt handling and overwrites your start wrapper. But it shall
not harm in any way if all needed arguments/environment are passed on
to your program. The wrapper just sets all signals to there default
actions and unblock them to allow there delivery. 

--
Harald
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to