
SIGSTACK(2)                UNIX Programmer's Manual                SIGSTACK(2)

NNAAMMEE
     ssiiggssttaacckk - set and/or get signal stack context

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<ssyyss//ssiiggnnaall..hh>>
     struct sigstack {
             caddr_t ss_sp;
             int     ss_onstack;
     };

     _i_n_t
     ssiiggssttaacckk(_c_o_n_s_t _s_t_r_u_c_t _s_i_g_s_t_a_c_k _*_s_s, _s_t_r_u_c_t _s_i_g_s_t_a_c_k _*_o_s_s)

DDEESSCCRRIIPPTTIIOONN
     SSiiggssttaacckk() allows users to define an alternate stack on which signals are
     to be processed.  If _s_s is non-zero, it specifies a _s_i_g_n_a_l _s_t_a_c_k on which
     to deliver signals and tells the system if the process is currently exe-
     cuting on that stack.  When a signal's action indicates its handler
     should execute on the signal stack (specified with a sigvec(2) call), the
     system checks to see if the process is currently executing on that 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 han-
     dler's execution.  If _o_s_s is non-zero, the current signal stack state is
     returned.

NNOOTTEESS
     Signal stacks are not ``grown'' automatically, as is done for the normal
     stack.  If the stack overflows unpredictable results may occur.

RREETTUURRNN VVAALLUUEESS
     Upon successful completion, a value of 0 is returned.  Otherwise, a value
     of -1 is returned and _e_r_r_n_o is set to indicate the error.

EERRRROORRSS
     SSiiggssttaacckk() will fail and the signal stack context will remain unchanged
     if one of the following occurs.

     [EFAULT]  Either _s_s or _o_s_s points to memory that is not a valid part of
               the process address space.

SSEEEE AALLSSOO
     sigvec(2),  setjmp(3)

HHIISSTTOORRYY
     The ssiiggssttaacckk function call appeared in 4.2BSD.

4.2 Berkeley Distribution       March 10, 1991                               1
















