This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: sigaltstack setting and RT signal handlers
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.