sigstack(2) DG/UX R4.11MU05 sigstack(2)
NAME
sigstack - set and/or get signal stack context
SYNOPSIS
#include <signal.h>
int sigstack (new_signal_stack, old_signal_stack)
struct sigstack * new_signal_stack;
struct sigstack * old_signal_stack;
where:
new_signal_stack NULL or address of new signal stack context
specifier
old_signal_stack NULL or address of old signal stack context
specifier
DESCRIPTION
Sigstack is used to install a new signal stack context and retrieve
the previous signal stack context. A new signal stack context is
optionally installed using the new_signal_stack parameter. If
new_signal_stack is NULL, the signal stack context remains unchanged.
Otherwise, new_signal_stack is installed. The previous signal stack
context may be obtained by the old_signal_stack parameter. If
old_signal_stack is NULL, the previous signal stack context is not
returned. Otherwise, the previous signal stack context information
is stored in the location pointed to by old_signal_stack.
A signal stack is an alternate execution stack on which signals are
processed. The signal stack context consists of two components: the
address of the base of the signal stack (ss_sp) and an indication as
to whether the process is currently executing on the signal stack
(ss_onstack).
In DG/UX, the user's stack grows from high to low addresses.
Therefore, the stack pointer, ss_sp, must be the upper bound of the
memory allocated for the alternate signal stack. The caller must
make this adjustment; it will not be made by the system.
When a signal's action is `catch' and its signal stack choice
specifies the signal stack, the system checks to see if the process
is currently executing on the signal stack. If the process is not
currently executing on the signal stack, the system arranges a switch
to the signal stack for the duration of the signal handler.
Signal stacks do not increase automatically, as is done for the
normal stack. If the stack overflows unpredictable results may
occur.
Sigstack will fail and the signal stack context will be unchanged if
an error occurs.
ACCESS CONTROL
None.
RETURN VALUE
0 Completed successfully.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to the following error code:
EFAULT Either new_signal_stack or old_signal_stack points to
memory which is not a valid part of the process address
space. The validity of the signal stack is not checked.
SEE ALSO
sigvec(2), setjmp(3C).
Licensed material--property of copyright holder(s)