Copyright © tutorialspoint.com
int sigaltstack(const stack_t *ss, stack_t *oss);
where:
Tag | Description |
---|---|
ss | points to a signalstack structure defined in <signal.h> containing stack content after the call. |
oss | if not NULL, points to a signalstack structure containing stack content before the call. |
The sigaltstack struct is defined in <signal.h> as follows:
|
Tag | Description |
---|---|
ss_sp | points to the stack structure. |
ss_flags | |
specifies the stack state to SS_DISABLE or SS_ONSTACK as follows:
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. | |
ss_size | |
specifies the size of the stack. |
Tag | Description |
---|---|
EINVAL | ss is not a null pointer the ss_flags member pointed to by ss contains flags other than SS_DISABLE. |
ENOMEM | The size of the alternate stack area is less than MINSIGSTKSZ. |
EPERM | An attempt was made to modify an active stack. |
Copyright © tutorialspoint.com