Hi, all
case 1:
stap -c 'sleep 100' -e 'probe begin{}'
# killing SIGUSR1 to "sleep 100" does not work as expected
case 2:
trap "" SIGSEGV # set SIGSEGV's handler as SIG_IGN
stap -c 'sleep 100' -e 'probe begin{}'
# killing SIGSEGV still works.
The bug reasons of case1 and case2 are same: the signal
handlers are not restored before exec().
It's not a serious bug, but it's not friendly to users.
This bug can be fixed by the patch below(Restore signals except
SIGINT).
There is also another good way: unblock all signals and
set signals' handlers as SIG_DFL **EXPLICITLY** before exec().
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>