From: Eliot M. <mo...@cs...> - 2006-03-12 18:30:37
|
Dear Ian -- I wouldn't try the handle signals on the given thread's stack. I'd use the alt stack mechanism and then manipulate the context and the stack to make it appear that the thread called a routine we have set up to do the processing, i.e., to come back into our scheduler and switch to another thread. This gives better control, I think, and will leave less stuff on the stack to confuse a stack walker. It was what I was trying to suggest before. It is analogous to what we do in the case of a null pointer deference: the signal handler forces a call to a routine whose only function is to construct and then throw the suitable exception object. Given that we made _that_ work, this strategy seems to me a better idea than leaving signal handling stuff on a thread stack .... Best wishes -- Eliot |