sigaltstack setting and RT signal handlers

Paul Mackerras paulus@samba.org
Sat Feb 8 01:34:00 GMT 2003


Ulrich Drepper writes:

> > The result of this is that if you call sigaltstack() inside a RT
> > signal handler,
> 
> You are not allowed to do that.  sigaltstack() cannot be called from a
> signal handler and therefore the behavior you're complaining about can
> never be a problem.

OK, that's reasonable.

What about changing the fields of *ucp inside a RT signal handler?
(By ucp I mean the ucontext_t * that is the 3rd argument to a RT
signal handler.)  Is it reasonable to expect that a signal handler can
change the sigaltstack setting of the process by altering
ucp->uc_stack?

Likewise, is it reasonable to expect that a signal handler can change
the register values of the interrupted context by altering
ucp->uc_mcontext?

Paul.



More information about the Libc-alpha mailing list