9.90 sigaltstack

typedef struct {
    void  *ss_sp;
    int    ss_flags;
    size_t ss_size;
} stack_t;

int sigaltstack(const stack_t *ss, stack_t *old_ss);

This syscall allows a thread to define an alternative stack to use for signal handling. The alternative stack will be only used if sa_sigaction requested it.

If old_ss is not NULL, the old alternative stack being replaced is returned there.

This syscall returns 0 on success, and returns -1 on failure, with the errno:

EAGAIN

Thread is not handling a signal.