Sets and gets signal stack context.
int sigstack ( InStack, OutStack)
struct sigstack *InStack, *OutStack;
The sigstack subroutine defines an alternate stack on which signals are to be processed.
When a signal occurs and its handler is to run on the signal stack, the system checks to see if the process is already running on that stack. If so, it continues to do so even after the handler returns. If not, the signal handler runs on the signal stack, and the original stack is restored when the handler returns.
Use the sigvec or sigaction subroutine to specify whether a given signal-handler routine is to run on the signal stack.
Attention: A signal stack does not automatically increase in size as a normal stack does. If the stack overflows, unpredictable results can occur.
Upon successful completion, the sigstack subroutine returns a value of 0. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.
The sigstack subroutine
is unsuccessful and the signal stack context remains unchanged if the
following is true:
EFAULT | The InStack or OutStack parameter points outside of the address space of the process. |
This subroutine is part of Base Operating System (BOS) Runtime.
Thelongjmp (setjmp or longjmp Subroutine) subroutine, setjmp (setjmp or longjmp Subroutine) subroutine, sigaction, signal, or sigvec (sigaction, sigvec, or signal Subroutine) subroutine.