SIGALTSTACKSection: Linux Programmer's Manual (2)Updated: 20 September 1999 |
SIGALTSTACKSection: Linux Programmer's Manual (2)Updated: 20 September 1999 |
int sigaltstack(const stack_t *ss, stack_t *oss);
where:
The sigaltstack struct is defined in <signal.h> as follows:
void *ss_sp /* SVID3 uses caddr_t ss_sp
int ss_flags
size_t ss_size
If ss is not NULL,the new state may be set to SS_DISABLE, which specifies that the stack is to be disabled and ss_sp and ss_size are ignored. If SS_DISABLE is not set, the stack will be enabled.
If oss is not NULL, the stack state may be either SS_ONSTACK or SS_DISABLE. The value SS_ONSTACK indicates that the process is currently executing on the alternate stack and that any attempt to modify it during execution will fail. The value SS_DISABLE indicates that the current signal stack is disabled.
The value SIGSTKSZ defines the average number of bytes used when allocating an alternate stack area. The value MINSIGSTKSZ defines the minimum stack size for a signal handler. When processing an alternate stack size, your program should include these values in the stack requirement to plan for the overhead of the operating system.