how to detect that I'm handling signal
Hi all,
I need to detect that function has been called during signal handling. In other words, there is signal handler installed. Inside handler is called function A(). In normal code, outside singal handler, the A() is called as well. The A() function contains code which is not possible to use in signal handler, so I need to detect that A() was called in signal handler context.
It is of course impossible to pass information whether signal is handled as a parameter. It is also impossible to differ A() function into two kinds, one for signals and one for normal context. In fact the A() function is injected into running code image.
Thanx in advance,
Igor Kopriva
|