From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2001-08-23 13:24:53
> > When an exception other than thread_end (or derived) escapes from the
> > thread procedure I would strongly prefer it to stop the whole program
> > (process). This should be the default behaviour.
> The problem with this approach is that resources will leak. When an
> exception escapes from main() in the single-threaded case we know that
> stack has been unwound. When an exception escapes from a thread the other
> threads' stacks will not be unwound, and the resources they've allocated
> will leak.
"If no matching handler is found in a program,
the function terminate() is called; whether or
not the stack is unwound before this call to
terminate() is implementation-defined"
"In the situation where no matching handler is found,
it is implementation-defined whether or not the stack
is unwound before terminate() is called."
"18.6.3 Abnormal termination
220.127.116.11 Type terminate_handler
typedef void (*terminate_handler)();
1 The type of a handler function to be called by terminate()
when terminating exception processing.
2 Required behavior: A terminate_handler shall terminate
execution of the program without returning to the caller.
3 Default behavior: The implementation's default
terminate_handler calls abort()."
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk