Almost like a separate thread. I guess it just sits there at the
global level doing nothing until a throw causes the instruction
pointer to branch to its entry point. I've notice nm show U
_Unwind_Resume@@GCC_3.0 at the top of all the programs I've looked at.
I assume that represents the entry address of
the exception handler.
Conceptually yes. In C, signals are caused by either some external
circumstance, such as the user using the kill(2) command, or by a
On Mon, 13 Sep 2004 03:24:59 -0400
"Steven T. Hatton" wrote:
program error, such as divide by zero or called using the raise(2)
function. The OS delivers the signal to the process. If the process has
registered a signal handler, (using signal(2) or sigaction(2)), the
signal handler is called directly by the OS. The signal handler has its
own stack, but executes in the user space. Signal handlers are somewhat
similar to threads as they run asynchronously, but different from
threads, the process is halted while the handler is running:
Main code:
...
xxx - signal raised or received
yyy ---------------> signal handler called
^-----------------< Signal handler returns, next instruction is
executed.
In a threaded environment, multiple threads run in parallel.
--
Jerry Feldman
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9